[llvm] [LV][EVL] Support in-loop reduction using tail folding with EVL. (PR #90184)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 06:25:16 PDT 2024


================
@@ -57,7 +57,55 @@ Value *VectorBuilder::createVectorInstruction(unsigned Opcode, Type *ReturnTy,
   auto VPID = VPIntrinsic::getForOpcode(Opcode);
   if (VPID == Intrinsic::not_intrinsic)
     return returnWithError<Value *>("No VPIntrinsic for this opcode");
+  return createVectorInstructionImpl(VPID, ReturnTy, InstOpArray, Name);
+}
+
+Value *VectorBuilder::createSimpleTargetReduction(RecurKind Kind, Type *ValTy,
+                                                  ArrayRef<Value *> InstOpArray,
+                                                  const Twine &Name) {
+  auto getForRecurKind = [](RecurKind Kind) {
----------------
alexey-bataev wrote:

```suggestion
  auto GetForRecurKind = [](RecurKind Kind) {
```

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


More information about the llvm-commits mailing list