https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67382
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-08-28
CC| |segher at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |segher at gcc dot
gnu.org
Summary|RTL combiner is too eager |RTL combiner is too eager
|to combine (plus (reg 92) |to combine (plus (reg 92)
|(reg 92)) to (ashift (reg |(reg 92)) to (ashift (reg
|92) (const_int 1)) |92) (const_int 1))
Ever confirmed|0 |1
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
0) Combine later tries everything together, which gives a parallel
of a no-op set and two normal sets; it cannot handle that (the trick
it does for a parallel of one no-op set and one normal one won't work).
1) The X+X -> X<<1 transform is done by simplify-rtx
(simplify_binary_operation_1).
Both formulations cost the same (4); it then picks the second.
2) It tries to match the same thing twice because it is a parallel; the
second time it tries with all clobbers removed. There aren't any so that
is a silly thing to do; will fix.
3) Confirmed, mine. It probably can be handled through the same mechanism
as rewriting zero_ext*; investigating.