This started as a small change, I swear. Unfortunately, lots of things call the...
[oota-llvm.git] / lib / Transforms / Scalar / LoopRotation.cpp
index 1f7892ad10159ce055a3067337a3f5bc88596dfe..6d8036518292ea0a07d2f9bc6deb50c443bdf288 100644 (file)
@@ -238,7 +238,7 @@ bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) {
     // This is not a PHI instruction. Insert its clone into original pre-header.
     // If this instruction is using a value from same basic block then
     // update it to use value from cloned instruction.
-    Instruction *C = In->clone();
+    Instruction *C = In->clone(*Context);
     C->setName(In->getName());
     OrigPreHeader->getInstList().push_back(C);