[llvm] [LV] Remove common extends and selects in CSE (PR #147731)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 17 07:14:02 PDT 2025


SamTebbs33 wrote:

> Does this change the final codegen? Side note: There's a flag `--extra-vectorizer-passes` that enables some cleanup after loop vectorization (including `early-cse`, which also de-duplicates these extends), but it's not enabled by default.

I managed to make an end-to-end test and saw that without these changes the extends are being removed, so it turns out this doesn't actually affect final codegen. I think it would still be useful to remove the extends here so that you don't see them if you're just running the loop-vectorize pass.

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


More information about the llvm-commits mailing list