diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index b2cc66852d5..5a92d3198af 100644 --- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -222,7 +222,7 @@ bool LoopIdiomRecognize::runOnCountableLoop() { // If this loop executes exactly one time, then it should be peeled, not // optimized by this pass. if (const SCEVConstant *BECst = dyn_cast<SCEVConstant>(BECount)) - if (BECst->getValue()->getValue() == 0) + if (BECst->getAPInt() == 0) return false; SmallVector<BasicBlock *, 8> ExitBlocks; @@ -253,7 +253,7 @@ static unsigned getStoreSizeInBytes(StoreInst *SI, const DataLayout *DL) { static unsigned getStoreStride(const SCEVAddRecExpr *StoreEv) { const SCEVConstant *ConstStride = cast<SCEVConstant>(StoreEv->getOperand(1)); - return ConstStride->getValue()->getValue().getZExtValue(); + return ConstStride->getAPInt().getZExtValue(); } bool LoopIdiomRecognize::isLegalStore(StoreInst *SI) { |