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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 22 09:04:10 PDT 2020


spatel added inline comments.


================
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]
----------------
qiucf wrote:
> spatel wrote:
> > 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.
> Thanks for explanation. I committed rGc1bc56bf4f and rG996dc13dc first and then this one. BTW, options/flags for FP operations may sometimes be confusing. It seems they should be clarified/reorganized.
Thanks for cleaning that test file! If you have a suggestion for improving the docs/comments for these flags, then we can fix it. I agree that it is messy.


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