https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109777
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Component|middle-end |target Status|UNCONFIRMED |NEW Last reconfirmed| |2023-05-08 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The place where the first difference in IR (not withstanding the debug insns) is mach. Without -g, there is an forced_nop instruction being added: (insn:SI # # # 6 (set (reg:SI 3 R3 [177]) (ashift:SI (reg:SI 4 R4 [orig:87 x$0 ] [87]) (const_int 1 [0x1]))) "t.c":44:47# {*ashlsi3_insn} (nil)) (insn:SI # # # 6 (set (reg:SI 2 R2) (mem/c:SI (plus:SI (reg/f:SI 14 SP) (const_int 8 [0x8])) [4 %sfp+-4 S4 A32])) "t.c":44:47# {*movsi_insn} (nil)) (insn:QI # # # 6 (unspec [ (const_int 0 [0]) ] 12) "t.c":44:47# {forced_nop} (nil)) (insn:TI # # # 6 (set (reg:SI 6 R6) (reg:SI 19 I3 [165])) "t.c":44:53# {*movsi_insn} (nil)) While with -g, it is not there: (insn:TI # # # 6 (set (reg:SI 3 R3 [177]) (ashift:SI (reg:SI 4 R4 [orig:87 x$0 ] [87]) (const_int 1 [0x1]))) "t.c":44:47# {*ashlsi3_insn} (nil)) (debug_insn # # # 6 (var_location:SI D#14 (ior:SI (reg:SI 3 R3 [177]) (const_int 31 [0x1f])))# (nil)) (insn # # # 6 (set (reg:SI 2 R2) (mem/c:SI (plus:SI (reg/f:SI 14 SP) (const_int 8 [0x8])) [4 %sfp+-4 S4 A32])) "t.c":45:14# {*movsi_insn} (nil)) (insn:TI # # # 6 (set (reg:SI 6 R6) (reg:SI 19 I3 [165])) "t.c":44:53# {*movsi_insn} (nil))