[llvm] [VPlan] Use vputils::findCanonicalIVIncrement in more places. NFC (PR #226516)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 08:04:47 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Luke Lau (lukel97)

<details>
<summary>Changes</summary>

In a future patch we want to enable more scenarios with early exits and tail folding. In these scenarios the terminator will no longer be a BranchOnCount/BranchOnCond but a BranchOnTwoConds, so a bunch of canonical IV matchers break. Use vputils::findCanonicalIVIncrement instead since it searches the users of the canonical IV instead of looking at the terminator.


---
Full diff: https://github.com/llvm/llvm-project/pull/226516.diff


3 Files Affected:

- (modified) llvm/lib/Transforms/Vectorize/LoopVectorize.cpp (+2-9) 
- (modified) llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp (+2-8) 
- (modified) llvm/lib/Transforms/Vectorize/VPlanEVLTailFolding.cpp (+7-13) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


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


More information about the llvm-commits mailing list