[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:49 PST 2024


================
@@ -1389,6 +1389,13 @@ class VPScalarCastRecipe : public VPSingleDefRecipe {
 
   /// Returns the result type of the cast.
   Type *getResultType() const { return ResultTy; }
+
+  bool onlyFirstLaneUsed(const VPValue *Op) const override {
+    // At the moment, only uniform codegen is implemented.
+    assert(is_contained(operands(), Op) &&
+           "Op must be an operand of the recipe");
+    return true;
+  }
----------------
ayalz wrote:

Can be pushed separately but only testable with rest of patch?

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


More information about the llvm-commits mailing list