summaryrefslogtreecommitdiff
path: root/gcc/cfgbuild.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-19 11:19:16 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-19 11:19:16 +0000
commit88a00894a2c731bdd60d9e5bea743125a48fdc51 (patch)
tree7a67687eb802bd0acdf8b565692414e4370ea6b1 /gcc/cfgbuild.c
parentd30774f57dd6a50e22cae0e57340f1e45d007901 (diff)
downloadgcc-88a00894a2c731bdd60d9e5bea743125a48fdc51.tar.gz
PR rtl-optimization/29841
* cfgbuild.c (control_flow_insn_p): Return TRUE for unconditional trap instructions. * sched-deps.c (sched_analyze_insn): Prevent all non-jump instructions that may cause control flow transfer from being moved. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123970 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r--gcc/cfgbuild.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index 3d05ebca0b7..642efc31e08 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -120,6 +120,11 @@ control_flow_insn_p (rtx insn)
|| can_throw_internal (insn));
case INSN:
+ /* Treat trap instructions like noreturn calls (same provision). */
+ if (GET_CODE (PATTERN (insn)) == TRAP_IF
+ && XEXP (PATTERN (insn), 0) == const1_rtx)
+ return true;
+
return (flag_non_call_exceptions && can_throw_internal (insn));
case BARRIER: