[llvm] [VPlan] Simplify select with constant condition (PR #150357)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 07:31:18 PDT 2025
artagnon wrote:
> > I wonder why InstSimplifyFolder didn't kick in here?
>
> I think some of these are exposed by other simplifications in simplifyRecipe, which tend to just mutate the operands in place rather than creating new instructions via VPBuilder
The InstSimplifyFolder is used independently of the VPBuilder, by matching live-ins in simplifyRecipe. I think the broadcast_splat operand in the changed tests aren't live-ins, and that's the reason the folder fails. Any opinions on extending tryToFoldLiveIns to handle the case when _some_ operands are live-ins? We're already doing a pretty extensive match there, and true/false in the select cond should be constant live-ins.
https://github.com/llvm/llvm-project/pull/150357
More information about the llvm-commits
mailing list