[PATCH] D72841: Add support for pragma float_control, to control precision and exception behavior at the source level

Michele Scandale via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 09:07:17 PDT 2020


michele.scandale added a comment.

In D72841#2030707 <https://reviews.llvm.org/D72841#2030707>, @rjmccall wrote:

> IIUC, the way within-statement contraction is supposed to work is that there are supposed to be blocking intrinsics inserted at various places.  I don't remember the details, though, or if anyone's thought about how it interacts with cross-statement contraction, which this pragma permits within the same function (and could occur with inlining regardless).


Prior to this change `contract` was never generated in the case of in-statement contraction only, instead clang was emitting `llvm.fmuladd` to inform the backend that only those were eligible for contraction. From a correctness perspective I think this was perfectly fine.

Currently I don't see any logic to generate "blocking intrinsics" (I guess to define a region around the instructions emitted for the given statement). Until such mechanism is in place, I think that generating the `contract` fast-math flag  also for in-statement contraction is wrong because it breaks the original program semantic.

Am I missing something?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72841





More information about the llvm-commits mailing list