http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54688



--- Comment #5 from Bernd Schmidt <bernds at gcc dot gnu.org> 2012-09-26 
13:18:41 UTC ---

(In reply to comment #3)

> It's r191493, the transformation is applied to a %sp-based load, which is

> invalid since the frame is destroyed, and the resulting offset is bogus:

> 

> In .split4:

> 

> (insn 52 41 43 4 (set (reg:SI 1 %g1 [orig:137 D.6097+8 ] [137])

>         (mem/c:SI (plus:SI (reg/f:SI 14 %sp)

>                 (const_int 80 [0x50])) [23 D.6097+8 S4 A64]))

> /home/eric/svn/gcc/gcc/ada/restrict.adb:1067 61 {*movsi_insn}

>      (expr_list:REG_EQUIV (mem/c:SI (plus:SI (reg/f:SI 14 %sp)

>                 (const_int 80 [0x50])) [23 D.6097+8 S4 A64])

>         (nil)))

> 

> [...]

> (note 60 43 61 4 NOTE_INSN_EPILOGUE_BEG)

> 

> (insn 61 60 62 4 (set (reg/f:SI 14 %sp)

>         (minus:SI (reg/f:SI 14 %sp)

>             (const_int -88 [0xffffffffffffffa8])))

> /home/eric/svn/gcc/gcc/ada/restrict.adb:1068 183 {subsi3}

> 

> In .sched2:

> 

> (insn 61 64 52 4 (set (reg/f:SI 14 %sp)

>         (minus:SI (reg/f:SI 14 %sp)

>             (const_int -88 [0xffffffffffffffa8])))

> /home/eric/svn/gcc/gcc/ada/restrict.adb:1068 183 {subsi3}

>      (nil))

> 

> (insn 52 61 43 4 (set (reg:SI 1 %g1 [orig:137 D.6097+8 ] [137])

>         (mem/c:SI (plus:SI (reg/f:SI 14 %sp)

>                 (const_int 168 [0xa8])) [23 D.6097+8 S4 A64]))

> /home/eric/svn/gcc/gcc/ada/restrict.adb:1067 61 {*movsi_insn}

>      (expr_list:REG_EQUIV (mem/c:SI (plus:SI (reg/f:SI 14 %sp)

>                 (const_int 80 [0x50])) [23 D.6097+8 S4 A64])

>         (nil)))



I admit I don't quite see yet why this would be invalid (assuming that the

stack grows from high address to low ones). What do you mean by "the frame is

destroyed", is there something special about sparc?

Reply via email to