aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LICM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/LICM.cpp')
-rw-r--r--lib/Transforms/Scalar/LICM.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 3df11a5ca2..9069338e32 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -319,12 +319,12 @@ void LICM::PromoteValuesInLoop() {
// Rewrite all loads and stores in the block of the pointer...
for (BasicBlock::iterator II = (*I)->begin(), E = (*I)->end();
II != E; ++II) {
- if (LoadInst *L = dyn_cast<LoadInst>(&*II)) {
+ if (LoadInst *L = dyn_cast<LoadInst>(II)) {
std::map<Value*, AllocaInst*>::iterator
I = ValueToAllocaMap.find(L->getOperand(0));
if (I != ValueToAllocaMap.end())
L->setOperand(0, I->second); // Rewrite load instruction...
- } else if (StoreInst *S = dyn_cast<StoreInst>(&*II)) {
+ } else if (StoreInst *S = dyn_cast<StoreInst>(II)) {
std::map<Value*, AllocaInst*>::iterator
I = ValueToAllocaMap.find(S->getOperand(1));
if (I != ValueToAllocaMap.end())