aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index fc894eb..257759d 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1139,6 +1139,11 @@ if_convertible_bb_p (class loop *loop, basic_block bb, basic_block exit_bb)
if (EDGE_COUNT (bb->succs) > 2)
return false;
+ gimple *last = last_stmt (bb);
+ if (gcall *call = safe_dyn_cast <gcall *> (last))
+ if (gimple_call_ctrl_altering_p (call))
+ return false;
+
if (exit_bb)
{
if (bb != loop->latch)