use cached value
authorGabor Greif <ggreif@gmail.com>
Mon, 28 Jun 2010 11:20:42 +0000 (11:20 +0000)
committerGabor Greif <ggreif@gmail.com>
Mon, 28 Jun 2010 11:20:42 +0000 (11:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107000 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/ScalarReplAggregates.cpp

index cae21e95fd5a3653342654c2ca0a4ea08474b429..d539f2bbf0aa4acff25cf2e5125346a590bcc579 100644 (file)
@@ -965,7 +965,7 @@ void SROA::isSafeForScalarRepl(Instruction *I, AllocaInst *AI, uint64_t Offset,
       isSafeGEP(GEPI, AI, GEPOffset, Info);
       if (!Info.isUnsafe)
         isSafeForScalarRepl(GEPI, AI, GEPOffset, Info);
-    } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(UI)) {
+    } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(User)) {
       ConstantInt *Length = dyn_cast<ConstantInt>(MI->getLength());
       if (Length)
         isSafeMemAccess(AI, Offset, Length->getZExtValue(), 0,