From d660541aa0d7b0f2a22c9fec96916bd006ac7129 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Wed, 4 Nov 2015 00:10:33 +0000 Subject: [PATCH] Fix unused variable warning from r252017 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252019 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopLoadElimination.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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(); -- 2.34.1