diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-10-01 14:23:18 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-10-01 14:37:38 -0400 |
commit | 149f5b573c79eac0c519ada4d2f7c50e17796cdf (patch) | |
tree | c4a6738dbf2d315041aa7ab7edc4436ac87a01b3 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 499260c03b916920d77c5833022937fd0e20d2c0 (diff) | |
download | llvm-149f5b573c79eac0c519ada4d2f7c50e17796cdf.zip llvm-149f5b573c79eac0c519ada4d2f7c50e17796cdf.tar.gz llvm-149f5b573c79eac0c519ada4d2f7c50e17796cdf.tar.bz2 |
[APFloat] convert SNaN to QNaN in convert() and raise Invalid signal
This is an alternate fix (see D87835) for a bug where a NaN constant
gets wrongly transformed into Infinity via truncation.
In this patch, we uniformly convert any SNaN to QNaN while raising
'invalid op'.
But we don't have a way to directly specify a 32-bit SNaN value in LLVM IR,
so those are always encoded/decoded by calling convert from/to 64-bit hex.
See D88664 for a clang fix needed to allow this change.
Differential Revision: https://reviews.llvm.org/D88238
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions