[llvm] [VPlan] Consistently use (Part, 0) for first lane scalar values (PR #80271)

via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 18 06:12:47 PST 2024


================
@@ -530,8 +543,7 @@ bool VPInstruction::onlyFirstLaneUsed(const VPValue *Op) const {
   case VPInstruction::CalculateTripCountMinusVF:
   case VPInstruction::CanonicalIVIncrementForPart:
   case VPInstruction::BranchOnCount:
-    // TODO: Cover additional operands.
-    return getOperand(0) == Op;
+    return true;
----------------
ayalz wrote:

This is fine, can probably be pushed separately, if testable. (written before the separate push ;-)
CalculateTripCountMinusVF and CanonicalIVIncrementForPart have a single operand, so NFC for them.
ActiveLaneMask and BranchOnCount have two operands, the (first lane of the) IV and the scalar uniform trip count.

https://github.com/llvm/llvm-project/pull/80271


More information about the llvm-commits mailing list