[llvm] r252019 - Fix unused variable warning from r252017

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 16:10:34 PST 2015


Author: anemet
Date: Tue Nov  3 18:10:33 2015
New Revision: 252019

URL: http://llvm.org/viewvc/llvm-project?rev=252019&view=rev
Log:
Fix unused variable warning from r252017

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp?rev=252019&r1=252018&r2=252019&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopLoadElimination.cpp Tue Nov  3 18:10:33 2015
@@ -59,12 +59,11 @@ struct StoreToLoadForwardingCandidate {
     Value *LoadPtr = Load->getPointerOperand();
     Value *StorePtr = Store->getPointerOperand();
     Type *LoadPtrType = LoadPtr->getType();
-    Type *StorePtrType = StorePtr->getType();
     Type *LoadType = LoadPtrType->getPointerElementType();
 
     assert(LoadPtrType->getPointerAddressSpace() ==
-               StorePtrType->getPointerAddressSpace() &&
-           LoadType == StorePtrType->getPointerElementType() &&
+               StorePtr->getType()->getPointerAddressSpace() &&
+           LoadType == StorePtr->getType()->getPointerElementType() &&
            "Should be a known dependence");
 
     auto &DL = Load->getParent()->getModule()->getDataLayout();




More information about the llvm-commits mailing list