diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-21 15:31:25 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-21 15:31:25 +0000 |
commit | 4f997567f927be3a082c95bb9af352f7060ab126 (patch) | |
tree | c6bbcadd7e846ee00216aaccb8e7b22363a80483 /gcc/ifcvt.c | |
parent | fa4052b343d0013312ab14f0b67ed171c88579fc (diff) | |
download | gcc-4f997567f927be3a082c95bb9af352f7060ab126.tar.gz |
PR target/60598
* ifcvt.c (dead_or_predicable): Return FALSE if there are any frame
related insns after epilogue_completed.
* gcc.dg/pr60598.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208749 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 79aa2f3092e..0d1adce952e 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -4144,6 +4144,21 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb, end = PREV_INSN (end); } + /* Don't move frame-related insn across the conditional branch. This + can lead to one of the paths of the branch having wrong unwind info. */ + if (epilogue_completed) + { + rtx insn = head; + while (1) + { + if (INSN_P (insn) && RTX_FRAME_RELATED_P (insn)) + return FALSE; + if (insn == end) + break; + insn = NEXT_INSN (insn); + } + } + /* Disable handling dead code by conditional execution if the machine needs to do anything funny with the tests, etc. */ #ifndef IFCVT_MODIFY_TESTS |