"Georg-Johann Lay" <a...@gjlay.de> writes: >> This patch takes a different approach to fixing PR52543 than does the >> patch in >> >> http://gcc.gnu.org/ml/gcc-patches/2012-03/msg00641.html >> >> This patch transforms the lower-subreg pass(es) from unconditionally >> splitting wide moves, zero extensions, and shifts, so that it now takes >> into account the target specific costs and only does the transformations >> if it is profitable. > > As far as I understand the pass, it's not only about splitting these > instructions > but also to the additional benefits of the split, i.e. AND 0xfffffffe will > only need > one QI operation instead of 1 SI operation that costs 4 QI. > > And in fact, the positive benefit of subreg-lowering occurs with bit-wise > operations > like AND, IOR, EOR etc.
Hmm, but in that case, why define andsi3 at all? optabs applies exactly that decomposition if you don't: /* These can be done a word at a time. */ if ((binoptab == and_optab || binoptab == ior_optab || binoptab == xor_optab) && mclass == MODE_INT && GET_MODE_SIZE (mode) > UNITS_PER_WORD && optab_handler (binoptab, word_mode) != CODE_FOR_nothing) Richard