> Therefore, I think that the best thing to do is to go back to Uros' original > idea of distributing the SUBREG only within a PLUS or a MINUS: > http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01682.html > The outer operation sort of guarantees that operating in this mode is OK for > the target, so the transformation can be done unconditionally. It could be > also done in simplify-rtx.c instead of combine.c.
It turns out that it's too late, Uros immediately after installed a couple of patches in the x86 back-end: http://gcc.gnu.org/ml/gcc-cvs/2012-10/msg01032.html http://gcc.gnu.org/ml/gcc-cvs/2012-10/msg01074.html that (very likely) rely on simplify_gen_subreg distributing the SUBREG. OK, at this point I'm going to propose the minimal kludge... -- Eric Botcazou