https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97071
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |powerpc64le Keywords| |missed-optimization --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Right before combine we see the following, still nicely with REG_EQUAL notes (insn 7 17 9 2 (set (reg:DF 119) (mem/u/c:DF (unspec:DI [ (symbol_ref/u:DI ("*.LC0") [flags 0x82]) (reg:DI 2 2) ] UNSPEC_TOCREL) [0 S8 A64])) "t.c":3:20 533 {*movdf_hardfloat64} (expr_list:REG_EQUAL (const_double:DF -3.0e+0 [-0x0.cp+2]) (nil))) (insn 9 7 14 2 (set (reg:DF 121) (mem/u/c:DF (unspec:DI [ (symbol_ref/u:DI ("*.LC2") [flags 0x82]) (reg:DI 2 2) ] UNSPEC_TOCREL) [0 S8 A64])) "t.c":3:20 533 {*movdf_hardfloat64} (expr_list:REG_EQUAL (const_double:DF 3.0e+0 [0x0.cp+2]) (nil))) (insn 14 9 15 2 (set (reg/i:DF 33 1) (fma:DF (reg:DF 124) (reg:DF 119) (reg:DF 121))) "t.c":4:1 894 {*fmadf4_fpr} (expr_list:REG_DEAD (reg:DF 124) (expr_list:REG_DEAD (reg:DF 121) (expr_list:REG_DEAD (reg:DF 119) (nil))))) eventually the easiest pass to teach this to is fwprop though as it already works DF DEF -> USE. Alternatively PRE could make the subtract and/or the negated value anticipated.