[PATCH] D88787: [llvm][mlir] Promote the experimental reduction intrinsics to be first class intrinsics.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 11:58:09 PDT 2020


nikic added inline comments.


================
Comment at: llvm/docs/LangRef.rst:15556
+'``llvm.vector.reduce.add.*``' Intrinsic
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
----------------
There's more underlines that need adjustment here.


================
Comment at: llvm/lib/IR/AutoUpgrade.cpp:745
+        else
+          Tys = {Args[0]};
+        NewFn = Intrinsic::getDeclaration(F->getParent(), ID, Tys);
----------------
Seeing this, I'm wondering whether we shouldn't change the type signature for fadd/fmul to omit the separate scalar type. It should be sufficient to have `vector.reduce.fadd.v4f32` rather than `vector.reduce.f32.v4f32`. The scalar argument has to match the vector type, just the like return type already has to match.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88787/new/

https://reviews.llvm.org/D88787



More information about the llvm-commits mailing list