diff options
author | Zahira Ammarguellat <zahira.ammarguellat@intel.com> | 2022-03-07 07:28:45 -0800 |
---|---|---|
committer | Zahira Ammarguellat <zahira.ammarguellat@intel.com> | 2022-03-17 11:48:03 -0700 |
commit | bbf0d1932a3c1be970ed8a580e51edf571b80fd5 (patch) | |
tree | 234d00e03cad005c9dd49538f5bf23b33ee36062 /llvm/unittests/Support/VirtualFileSystemTest.cpp | |
parent | 27e1931508115f9a2a942845a2df0ee11be3332a (diff) | |
download | llvm-bbf0d1932a3c1be970ed8a580e51edf571b80fd5.zip llvm-bbf0d1932a3c1be970ed8a580e51edf571b80fd5.tar.gz llvm-bbf0d1932a3c1be970ed8a580e51edf571b80fd5.tar.bz2 |
Currently the control of the eval-method is mixed with fast-math.
FLT_EVAL_METHOD tells the user the precision at which, temporary results
are evaluated but when fast-math is enabled, the numeric values are not
guaranteed to match the source semantics, so the eval-method is
meaningless.
For example, the expression `x + y + z` has as source semantics `(x + y)
+ z`. FLT_EVAL_METHOD is telling the user at which precision `(x + y)`
is evaluated. With fast-math enable the compiler can choose to
evaluate the expression as `(y + z) + x`.
The correct behavior is to set the FLT_EVAL_METHOD to `-1` to tell the
user that the precision of the intermediate values is unknow. This
patch is doing that.
Differential Revision: https://reviews.llvm.org/D121122
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions