diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 8bb4e17..85e28ea 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -1793,9 +1793,9 @@ Value *llvm::addDiffRuntimeChecks( auto *VFTimesUFTimesSize = ChkBuilder.CreateMul(GetVF(ChkBuilder, Ty->getScalarSizeInBits()), ConstantInt::get(Ty, IC * C.AccessSize)); - Value *Sink = Expander.expandCodeFor(C.SinkStart, Ty, Loc); - Value *Src = Expander.expandCodeFor(C.SrcStart, Ty, Loc); - Value *Diff = ChkBuilder.CreateSub(Sink, Src); + auto &SE = *Expander.getSE(); + Value *Diff = Expander.expandCodeFor( + SE.getMinusSCEV(C.SinkStart, C.SrcStart), Ty, Loc); Value *IsConflict = ChkBuilder.CreateICmpULT(Diff, VFTimesUFTimesSize, "diff.check"); if (C.NeedsFreeze) |