================ @@ -347,7 +347,12 @@ void RuntimePointerChecking::tryToCreateDiffCheck( auto *SinkStartAR = cast<SCEVAddRecExpr>(SinkStartInt); const Loop *StartARLoop = SrcStartAR->getLoop(); if (StartARLoop == SinkStartAR->getLoop() && - StartARLoop == InnerLoop->getParentLoop()) { + StartARLoop == InnerLoop->getParentLoop() && + // If the diff check would already be loop invariant (due to the + // recurrences being the same), then we should still prefer the diff ---------------- paulwalker-arm wrote:
Perhaps "...,then we prefer to keep the diff check because they are cheaper." https://github.com/llvm/llvm-project/pull/73515 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits