[llvm] [VPlan] Handle single-scalar conds in VPWidenSelectRecipe. (PR #165506)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 29 17:27:22 PDT 2025
================
@@ -1757,16 +1757,8 @@ struct LLVM_ABI_FOR_TEST VPWidenSelectRecipe : public VPRecipeWithIRFlags,
return getOperand(0);
}
- bool isInvariantCond() const {
- return getCond()->isDefinedOutsideLoopRegions();
- }
-
/// Returns true if the recipe only uses the first lane of operand \p Op.
- bool onlyFirstLaneUsed(const VPValue *Op) const override {
- assert(is_contained(operands(), Op) &&
- "Op must be an operand of the recipe");
- return Op == getCond() && isInvariantCond();
- }
+ bool onlyFirstLaneUsed(const VPValue *Op) const override;
----------------
fhahn wrote:
As in pushing the single-scalar check upwards? Currently this is mostly used to determine if we need broadcasts/extracts
https://github.com/llvm/llvm-project/pull/165506
More information about the llvm-commits
mailing list