[PATCH] D103233: [Matrix] Preserve existing fast-math flags during lowering

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 1 03:06:48 PDT 2021


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM with the inline nits. Thanks!



================
Comment at: llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp:410
+
+    if (isa<FPMathOperator>(*Inst)) {
+      FMF = Inst->getFastMathFlags();
----------------
nit: drop `{}`


================
Comment at: llvm/test/Transforms/LowerMatrixIntrinsics/preserve-existing-fast-math-flags.ll:178
+  %res.5 = fmul reassoc contract <4 x float> %res.3, %res.4
+  %res.6 = tail call reassoc <4 x float> @llvm.matrix.multiply.v4f32.v4f32.v4f32(<4 x float> %res.4, <4 x float> %res.5, i32 2, i32 2, i32 2)
+  %res.7 = tail call contract reassoc <4 x float> @llvm.matrix.multiply.v4f32.v4f32.v4f32(<4 x float> %res.5, <4 x float> %res.6, i32 2, i32 2, i32 2)
----------------
could you split up the test, possibly into separate ones for each multiply? Otherwise the IR to check for a single function seems unnecessarily big.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103233



More information about the llvm-commits mailing list