[llvm] [VPlan] Handle single-scalar conds in VPWidenSelectRecipe. (PR #165506)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 6 01:13:33 PST 2025
================
@@ -1286,6 +1286,15 @@ static void simplifyRecipe(VPSingleDefRecipe *Def, VPTypeAnalysis &TypeInfo) {
return;
}
+ // Look through broadcast of single-scalar when used as select conditions; in
+ // that case the scalar condition can be used directly.
+ if (match(Def,
+ m_Select(m_Broadcast(m_VPValue(C)), m_VPValue(), m_VPValue())) &&
+ vputils::isSingleScalar(C)) {
----------------
ayalz wrote:
Is this redundant (can assert instead) - if Def is a Broadcast its operand C must be a single scalar?
https://github.com/llvm/llvm-project/pull/165506
More information about the llvm-commits
mailing list