[PATCH] D76419: [DAGCombiner] Add nsz constraint to aggressive fma folding

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 09:44:45 PDT 2020


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

LGTM



================
Comment at: llvm/test/CodeGen/PowerPC/fma-assoc.ll:133-136
+  %F = fmul nsz double %A, %B         ; <double> [#uses=1]
+  %G = fmul nsz double %C, %D         ; <double> [#uses=1]
+  %H = fadd nsz double %F, %G         ; <double> [#uses=1]
+  %I = fsub nsz double %E, %H         ; <double> [#uses=1]
----------------
That's not what I was hoping for, but I see now that this whole test file should be updated. We should treat "-enable-unsafe-fp-math" on the RUN line as deprecated and replace that with "fast" or "reassoc" in the IR. But that will require duplicating tests if I'm seeing it correctly.

I won't block this correctness fix on the test improvements, but please make that change as an NFC follow-up or least mark this file with a FIXME.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76419





More information about the llvm-commits mailing list