[llvm] [LV][VPlan] Add initial support for CSA vectorization (PR #106560)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 22 13:20:06 PST 2024


================
@@ -649,6 +652,57 @@ Value *VPInstruction::generate(VPTransformState &State) {
     Value *A = State.get(getOperand(0));
     return Builder.CreateOrReduce(A);
   }
+  case VPInstruction::AnyOfEVL: {
+    Value *WidenedCond = State.get(getOperand(0));
+    Value *AllOnesMask = Constant::getAllOnesValue(
+        VectorType::get(Type::getInt1Ty(State.Builder.getContext()), State.VF));
+    Value *EVL = State.get(getOperand(1), /*NeedsScalar=*/true);
+
+    Value *StartValue =
+        ConstantInt::get(WidenedCond->getType()->getScalarType(), 0);
+    Value *AnyOf = State.Builder.CreateIntrinsic(
----------------
fhahn wrote:

Better use VPWidenIntrinsic like for other EVL based recipes if possible?


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


More information about the llvm-commits mailing list