diff options
author | Sanjay Patel <spatel@rotateright.com> | 2021-12-16 08:37:44 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2021-12-16 09:10:12 -0500 |
commit | 8c7f2a4f871928d8734ee3f03e67d09086850b60 (patch) | |
tree | 560dbcc3bed1ba06abbfc9c120075742b0e009e7 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 9a35844990159f2ced980147f2af4ead4c2d4e93 (diff) | |
download | llvm-8c7f2a4f871928d8734ee3f03e67d09086850b60.zip llvm-8c7f2a4f871928d8734ee3f03e67d09086850b60.tar.gz llvm-8c7f2a4f871928d8734ee3f03e67d09086850b60.tar.bz2 |
[CodeGen] use saturating FP casts when compiling with "no-strict-float-cast-overflow"
We got an unintended consequence of the optimizer getting smarter when
compiling in a non-standard mode, and there's no good way to inhibit
those optimizations at a later stage. The test is based on an example
linked from D92270.
We allow the "no-strict-float-cast-overflow" exception to normal C
cast rules to preserve legacy code that does not expect overflowing
casts from FP to int to produce UB. See D46236 for details.
Differential Revision: https://reviews.llvm.org/D115804
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
0 files changed, 0 insertions, 0 deletions