[llvm] [LV] Scalarize induction compare live-outs (PR #222521)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 01:50:28 PDT 2026


wangpc-pp wrote:

> I am not sure this should be fixed in the vectorizer. This looks like a missed scalar sinking optimization?

It is for a case from Mysql, the simplified code is: https://godbolt.org/z/on5jx9Kz1.

Both AArch64 and RISC-V generate vectorized code but `instcombine` deletes the vectrized loop in the later pipeline for AArch64 while RISC-V can't because of the EVL-style vectorization. So I think maybe we can fix it in LV. :-)



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


More information about the llvm-commits mailing list