summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-07-27 20:18:04 +0000
committerBill Wendling <isanbard@gmail.com>2011-07-27 20:18:04 +0000
commit772fe17a6d07304ae2e6b3052bbb24ebb751f0f3 (patch)
tree650bbc3bc584177420dee94b9fdb338ca8109bb9 /lib/Transforms/InstCombine
parent7e1547ebf726a40e7ed3dbe89a77e1b946a8e2d0 (diff)
downloadllvm-772fe17a6d07304ae2e6b3052bbb24ebb751f0f3.tar.gz
llvm-772fe17a6d07304ae2e6b3052bbb24ebb751f0f3.tar.bz2
llvm-772fe17a6d07304ae2e6b3052bbb24ebb751f0f3.tar.xz
Merge the contents from exception-handling-rewrite to the mainline.
This adds the new instructions 'landingpad' and 'resume'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index c33dec1740..09edc41997 100644
--- a/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -732,9 +732,11 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
}
}
- // If the stack restore is in a return/unwind block and if there are no
- // allocas or calls between the restore and the return, nuke the restore.
- if (!CannotRemove && (isa<ReturnInst>(TI) || isa<UnwindInst>(TI)))
+ // If the stack restore is in a return, resume, or unwind block and if there
+ // are no allocas or calls between the restore and the return, nuke the
+ // restore.
+ if (!CannotRemove && (isa<ReturnInst>(TI) || isa<ResumeInst>(TI) ||
+ isa<UnwindInst>(TI)))
return EraseInstFromFunction(CI);
break;
}