-/*
+/**
* Project: libFIRM
* File name: ir/be/ia32/ia32_optimize.c
* Purpose: Implements several optimizations for IA32
am_flav = ia32_am_N;
/* determine new am flavour */
- if (offs || offs_cnst || offs_lea) {
+ if (offs || offs_cnst || offs_lea || have_am_sc) {
am_flav |= ia32_O;
}
if (! be_is_NoReg(cg, base)) {
DBG_OPT_AM_D(load, store, irn);
DB((mod, LEVEL_1, "merged with %+F and %+F into dest AM\n", load, store));
+
+ need_exchange_on_fail = 0;
}
} /* if (store) */
else if (get_ia32_am_support(irn) & ia32_am_Source) {
}
/* was exchanged but optimize failed: exchange back */
- if (check_am_src && need_exchange_on_fail) {
+ if (need_exchange_on_fail) {
exchange_left_right(irn, &left, &right, 3, 2);
cand = orig_cand;
}