[PATCH] D69989: Assume ieee behavior without denormal-fp-math attribute

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 07:04:30 PST 2020


arsenm marked an inline comment as done.
arsenm added inline comments.


================
Comment at: clang/lib/CodeGen/CGCall.cpp:1754
                              CodeGenOpts.FPDenormalMode.str());
-    if (CodeGenOpts.FP32DenormalMode.isValid()) {
+    if (CodeGenOpts.FP32DenormalMode != CodeGenOpts.FPDenormalMode) {
       FuncAttrs.addAttribute(
----------------
spatel wrote:
> I haven't followed the FP32 patches as closely as others, so I might have missed the reasoning here. 
> 
> As-is, we may need to explicitly say that FP32 is IEEE while everything is else is not (although I assume that would be a strange config). 
> 
> Do we have a test for that?
> Is that better than making the FP32 attribute behave like the other FP attribute (assume IEEE unless otherwise specified)?
denormal-fp-math sets the mode for all types. denormal-fp-math-f32 overrides it in the case of f32. It's still possible to configure a function to assume flushing for non-f32, and ieee for f32. We do have backend tests for the strange IEEE f32, non-IEEE other case in the backend but I'm not sure for the frontend flag handling


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

https://reviews.llvm.org/D69989





More information about the llvm-commits mailing list