aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/JSON.cpp
diff options
context:
space:
mode:
authorEli Friedman <efriedma@quicinc.com>2020-09-23 14:10:33 -0700
committerEli Friedman <efriedma@quicinc.com>2020-09-23 14:10:33 -0700
commit3f739f736b8fed6f4d63569f56c985ef04b21cd1 (patch)
tree2413114e8097bae081f0d1dbf430d87f128e254f /llvm/lib/Support/JSON.cpp
parente8413ac97f6ca2b1897cc9555ad9b0194456629f (diff)
downloadllvm-3f739f736b8fed6f4d63569f56c985ef04b21cd1.zip
llvm-3f739f736b8fed6f4d63569f56c985ef04b21cd1.tar.gz
llvm-3f739f736b8fed6f4d63569f56c985ef04b21cd1.tar.bz2
[SelectionDAG][GISel] Make LegalizeDAG lower FNEG using integer ops.
Previously, if a floating-point type was legal, but FNEG wasn't legal, we would use FSUB. Instead, we should use integer ops, to preserve the semantics. (Alternatively, there's a compiler-rt call we could use, but there isn't much reason to use that.) It turns out we actually are still using this obscure codepath in a few cases: on some targets, we have "legal" floating-point types that don't actually support any floating-point operations. In particular, ARM and AArch64 are using this path. The implementation for SelectionDAG is pretty simple because we can reuse the infrastructure from FCOPYSIGN. See also 9a3dc3e, the corresponding change to type legalization. Also includes a "bonus" change to STRICT_FSUB legalization, so we can lower a STRICT_FSUB to a float libcall. Includes the changes to both LegalizeDAG and GlobalISel so we don't have inconsistent results in the future. Fixes https://bugs.llvm.org/show_bug.cgi?id=46792 . Differential Revision: https://reviews.llvm.org/D84287
Diffstat (limited to 'llvm/lib/Support/JSON.cpp')
0 files changed, 0 insertions, 0 deletions