diff options
| author | Bill Wendling <isanbard@gmail.com> | 2011-08-25 01:08:34 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2011-08-25 01:08:34 +0000 |
| commit | 07efd6f1e030d043e52d44c38a2cc8ea320025c5 (patch) | |
| tree | 7f17005feafa08744087351e57c20886e6d1758a /llvm/lib/Transforms/InstCombine | |
| parent | f066b2fe9917d5972e706b028f4b133249bae4ad (diff) | |
| download | bcm5719-llvm-07efd6f1e030d043e52d44c38a2cc8ea320025c5.tar.gz bcm5719-llvm-07efd6f1e030d043e52d44c38a2cc8ea320025c5.zip | |
When inserting new instructions, use getFirstInsertionPt instead of
getFirstNonPHI so that it will skip over the landingpad instructions as well.
llvm-svn: 138537
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index 09edc419978..4c9cbdb4e63 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -1145,7 +1145,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { // If this is an invoke instruction, we should insert it after the first // non-phi, instruction in the normal successor block. if (InvokeInst *II = dyn_cast<InvokeInst>(Caller)) { - BasicBlock::iterator I = II->getNormalDest()->getFirstNonPHI(); + BasicBlock::iterator I = II->getNormalDest()->getFirstInsertionPt(); InsertNewInstBefore(NC, *I); } else { // Otherwise, it's a call, just insert cast right after the call. |

