From: Adam Nemet Date: Wed, 4 Nov 2015 00:10:33 +0000 (+0000) Subject: Fix unused variable warning from r252017 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d660541aa0d7b0f2a22c9fec96916bd006ac7129;p=oota-llvm.git Fix unused variable warning from r252017 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252019 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopLoadElimination.cpp b/lib/Transforms/Scalar/LoopLoadElimination.cpp index 3dc9f84387e..eb64fbff1d3 100644 --- a/lib/Transforms/Scalar/LoopLoadElimination.cpp +++ b/lib/Transforms/Scalar/LoopLoadElimination.cpp @@ -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();