aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-08-16 20:45:24 +0000
committerBill Wendling <isanbard@gmail.com>2011-08-16 20:45:24 +0000
commit5b6f42f57e730c2d968c313a27fa505a3c3e5efa (patch)
treeaee4fbd451c00de169c171710e4ee9becd07b2aa /lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
parentd2e103daf8a093e0e25ddbaa7549c083887196e8 (diff)
downloadexternal_llvm-5b6f42f57e730c2d968c313a27fa505a3c3e5efa.zip
external_llvm-5b6f42f57e730c2d968c313a27fa505a3c3e5efa.tar.gz
external_llvm-5b6f42f57e730c2d968c313a27fa505a3c3e5efa.tar.bz2
Use the getFirstInsertionPt() method instead of getFirstNonPHI + an 'isa<>'
check for a LandingPadInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index b987340..7446a51 100644
--- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -600,8 +600,7 @@ bool InstCombiner::SimplifyStoreAtEndOfBlock(StoreInst &SI) {
// Advance to a place where it is safe to insert the new store and
// insert it.
- BBI = DestBB->getFirstNonPHI();
- if (isa<LandingPadInst>(BBI)) ++BBI;
+ BBI = DestBB->getFirstInsertionPt();
StoreInst *NewSI = new StoreInst(MergedVal, SI.getOperand(1),
SI.isVolatile(),
SI.getAlignment(),