[llvm] [VPlan] Expand AddRecs in VPSCEVExpander (PR #209921)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 23 15:59:54 PDT 2026
artagnon wrote:
> > > Could you add an IR test case for this so we can confirm this is fixed by #215253?
> >
> >
> > Very sorry about not adding the test -- I was busy with SCEV work. However, the test would be no different in principle from what you've already included in the PR: llvm-opt-benchmark shows this. By the way, we can use llvm-opt-benchmark for vectorization, as it runs the vectorizer now!
>
> Looks like it wasn't fixed -- will try to add that test now.
Okay, I think I finally understand why I was struggling to create a reproducer: the root cause of the tiny regression is instruction reordering, an instance of which can be seen [here](https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/992/changes#r3839814444). Notice that everything around the GEP is expanded by VPSCEVExpander, while the GEP itself is IR-expanded. Notice also that the GEP is used by a MemCheck block -- I tried everything to create a pointer AR to be expanded by VPSCEVExpander, but it is impossible; indeed, the MemCheck block is outside of VPlan entirely, and in IR, and it is impossible to expand the GEP via VPSCEVExpander, because it's not even visible in VPlan!
https://github.com/llvm/llvm-project/pull/209921
More information about the llvm-commits
mailing list