Simplify this code.
authorDan Gohman <gohman@apple.com>
Sat, 31 Oct 2009 14:46:50 +0000 (14:46 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 31 Oct 2009 14:46:50 +0000 (14:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85662 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/LoopUnroll.cpp

index 4d838b50e345143297c0927dddecc92bd186d7c1..d68427afce797c2c386636ad9aaa9c4ed6f3d157 100644 (file)
@@ -44,8 +44,8 @@ static inline void RemapInstruction(Instruction *I,
   for (unsigned op = 0, E = I->getNumOperands(); op != E; ++op) {
     Value *Op = I->getOperand(op);
     DenseMap<const Value *, Value*>::iterator It = ValueMap.find(Op);
-    if (It != ValueMap.end()) Op = It->second;
-    I->setOperand(op, Op);
+    if (It != ValueMap.end())
+      I->setOperand(op, It->second);
   }
 }