http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45903
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org |gnu.org | --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-10-06 13:04:23 UTC --- Created attachment 21971 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=21971 gcc46-pr45903.patch Untested patch that deals with this in the combiner. Of course it can't handle f64or2 (and doesn't handle even cases when combiner rejects it for other reasons, e.g. unsigned long long a; unsigned char c; void foo (void) { c = a >> 8; } is not optimized, because (set (mem:QI (symbol_ref:P "c")) (mem:QI (const:P (plus:P (symbol_ref:P "a") (const_int 1))))) is not recognized as insn. At the tree level optionally it would be possible to perform such arithmetics in narrower type and thus making this optimization to hit more often.