On Tue, Feb 21, 2012 at 12:38:48PM +0100, Georg-Johann Lay wrote:
> However, if all insns that are involved in SP/FP manipulation get the
> RTX_FRAME_RELATED_P, almost every test case that has -g crashes with this
> dwarf-ICE.

My suggestion actually wasn't to use unspec for reading from sp, but instead
to use it on the insn which sets sp from hfp, i.e. instead of that
   (insn 47 46 48 2 (set (reg/f:HI 32 __SP_L__)
           (reg/f:HI 28 r28)) pr50063.c:9 -1
        (nil))
in the testcase use:
   (insn 47 46 48 2 (set (reg/f:HI 32 __SP_L__)
           (unspec [(reg/f:HI 28 r28)] UNSPEC_SET_SP_FROM_FP)) pr50063.c:9 -1
        (nil))
or so.  You should be able to use REG_FRAME_RELATED_EXPR with the old set
if needed (though, the insn strangely isn't RTX_FRAME_RELATED_P, preexisting
bug?).  Just to hide from cselib/alias code that you are setting hfp from
sp, then adjusting hfp and then setting sp back from it.  With the unspec
it will just not know what value sp has there.

        Jakub

Reply via email to