[llvm] [VPlan] Use VPWidenIntrinsicRecipe to vp.select. (PR #110489)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 20:19:11 PDT 2024
================
@@ -1042,6 +1041,14 @@ StringRef VPWidenIntrinsicRecipe::getIntrinsicName() const {
return Intrinsic::getBaseName(VectorIntrinsicID);
}
+bool VPWidenIntrinsicRecipe::onlyFirstLaneUsed(const VPValue *Op) const {
+ assert(is_contained(operands(), Op) && "Op must be an operand of the recipe");
+ // Vector predication intrinsics only demand the the first lane the last
+ // operand (the EVL operand).
+ return VPIntrinsic::isVPIntrinsic(VectorIntrinsicID) &&
+ Op == getOperand(getNumOperands() - 1);
----------------
fhahn wrote:
I don't see the changes in the current version of the PR I think? Would probably be good to improve (I assume scalar arg here means we only request the first lane). If there are unrelated tests that improve, would be good to prepare a separate patch
https://github.com/llvm/llvm-project/pull/110489
More information about the llvm-commits
mailing list