https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87763
Segher Boessenkool <segher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-10-26
Ever confirmed|0 |1
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
The two relevant insns are
(insn 35 4 40 2 (set (reg:SI 33 v1 [99])
(reg:SI 0 x0 [ a ])) "87763.c":2:1 46 {*movsi_aarch64}
(nil))
(insn 7 10 8 2 (set (reg:SF 33 v1 [orig:95 c ] [95])
(float:SF (reg:SI 33 v1 [99]))) "87763.c":2:14 921 {floatsisf2}
(nil))
(this is the LRA dump; IRA already allocated those registers, LRA didn't
change anything).
99 was assigned a floating point register:
Choosing alt 12 in insn 35: (0) w (1) rZ {*movsi_aarch64}
Choosing alt 0 in insn 7: (0) =w (1) w {floatsisf2}
an integer register would be alt 0 (r<-r), resp. alt 1 (w<-?r). So apparently
the "?" was costed as more strongly than the cost of the removable register
move, or IRA didn't see that move was unnecessary.
Confirmed, btw.