[llvm] [clang] [clang-tools-extra] [LoopVectorize] Improve algorithm for hoisting runtime checks (PR #73515)

David Sherwood via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 8 06:44:42 PST 2023


================
@@ -346,7 +346,9 @@ void RuntimePointerChecking::tryToCreateDiffCheck(
     auto *SinkStartAR = cast<SCEVAddRecExpr>(SinkStartInt);
     const Loop *StartARLoop = SrcStartAR->getLoop();
     if (StartARLoop == SinkStartAR->getLoop() &&
-        StartARLoop == InnerLoop->getParentLoop()) {
+        StartARLoop == InnerLoop->getParentLoop() &&
+        SrcStartAR->getStepRecurrence(*SE) !=
----------------
david-arm wrote:

Hi @fhahn, sorry I only just saw this now! I find with github it's really easy to miss review comments compared to Phabricator...

https://github.com/llvm/llvm-project/pull/73515


More information about the cfe-commits mailing list