llvm-project
ec25a056 - [VPlan] Don't convert VPWidenSelectRecipes to vp.select in EVL transform (#146695)

Commit
213 days ago
[VPlan] Don't convert VPWidenSelectRecipes to vp.select in EVL transform (#146695) createEVLRecipe tries to optimise recipes that use the header mask by replacing them with their VP equivalents and setting the EVL, allowing the mask to be removed. However we currently also convert widened selects to vp.select even though they don't necessarily use the header mask. Unlike vp.merge a vp.select only makes the "unused" lanes past EVL poison, so it's not needed for correctness. In the same vein as #127180, this patch removes the transform for VPWidenSelectRecipes and keeps them as plain select instructions to allow for more optimisations. RISCVVLOptimizer will still be able to optimise away any VL toggles and we end up with better code generation across llvm-test-suite and SPEC CPU 2017.
Author
Parents
Loading