[PATCH] D74075: [mlir][VectorOps] Introduce a `vector.fma` op that works on n-D vectors and lowers to `llvm.intrin.fmuladd`

Aart Bik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 14:45:45 PST 2020


aartbik requested changes to this revision.
aartbik added inline comments.
This revision now requires changes to proceed.


================
Comment at: mlir/include/mlir/Dialect/VectorOps/VectorOps.td:382
+  let description = [{
+    Multiply-add expressions that operates on n-D f32 or f64 vectors and lower
+    to the llvm.fmuladd.* intrinsic.
----------------
typo: that operate (plural)

but more in general, can you describe the semantics in a bit more detail than this? In particular, the lowering part to llvm could be mentioned at one point as motivation to have this, but it seems a bit strange to mention that in the very first sentence already.




================
Comment at: mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir:618
+{
+  //         CHECK: llvm.intr.fmuladd{{.*}}: (!llvm<"<8 x float>">, !llvm<"<8 x float>">, !llvm<"<8 x float>">) -> !llvm<"<8 x float>">
+  %0 = vector.fma %a, %a, %a : vector<8xf32>
----------------
perhaps use the  %[[s0:.*]]  = .... to capture the values and make sure they are used where expected?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74075





More information about the llvm-commits mailing list