[llvm] [VPlan] Handle single-scalar conds in VPWidenSelectRecipe. (PR #165506)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 13:01:19 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)) {
----------------
fhahn wrote:
Yep, converted to an assert in 17ad8480f8e67d902d85817275cee0158d1c85e5, thanks!
https://github.com/llvm/llvm-project/pull/165506
More information about the llvm-commits
mailing list