https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61984
Segher Boessenkool <segher at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-08-10 CC| |segher at gcc dot gnu.org Component|target |rtl-optimization Ever confirmed|0 |1 --- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> --- GCC already does this transformation: the pattern used for the compare is mov<mode>_internal2. With -m32, the wanted "mr. 3,4" comes out. With -m64, IRA makes a non-optimal decision: it gets {r125:CC=(r4<=>0); r124=r4} as a first insn, and as a secon insn it gets (in a different BB) r3=r124, and then it decides assigning r4 to the pseudo r124 is the best idea.