From: Chad Rosier Date: Thu, 19 Nov 2015 17:27:28 +0000 (+0000) Subject: [LIR] Use the more appropriate method. NFC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=670e8f39ad8365803c3fc7fa0fe0c52b204fd170;p=oota-llvm.git [LIR] Use the more appropriate method. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253578 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index c2fb8cd49b7..e3c84c6e71b 100644 --- a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -367,7 +367,7 @@ bool LoopIdiomRecognize::processLoopStore(StoreInst *SI, const SCEV *BECount) { // for (i) A[i] = B[i]; if (LoadInst *LI = dyn_cast(StoredVal)) { const SCEVAddRecExpr *LoadEv = - dyn_cast(SE->getSCEV(LI->getOperand(0))); + dyn_cast(SE->getSCEV(LI->getPointerOperand())); if (LoadEv && LoadEv->getLoop() == CurLoop && LoadEv->isAffine() && StoreEv->getOperand(1) == LoadEv->getOperand(1) && LI->isSimple()) if (processLoopStoreOfLoopLoad(SI, StoreSize, StoreEv, LoadEv, BECount,