[llvm] [VPlan] Implementation of onlyFirstLaneUsed for VPLiveOut class (PR #93513)

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 04:31:23 PDT 2024


================
@@ -186,6 +186,13 @@ bool VPRecipeBase::mayHaveSideEffects() const {
   }
 }
 
+bool VPLiveOut::onlyFirstLaneUsed(const VPValue *Op) const {
+  assert(is_contained(operands(), Op) && "Op must be an operand of the recipe");
+
+  return vputils::isUniformAfterVectorization(getOperand(0)) ||
+         isa<VPWidenPointerInductionRecipe>(Op);
----------------
arcbbb wrote:

fixupIVUsers removes the VPLiveOut after its fix. Given that the end value of IV is derived from TripCount, I just think we might alternatively eliminate  the use of ptr-iv by  creating a new VPValue for VPLiveOut.

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


More information about the llvm-commits mailing list