diff options
author | Fraser Cormack <fraser@codeplay.com> | 2022-01-19 16:17:59 +0000 |
---|---|---|
committer | Fraser Cormack <fraser@codeplay.com> | 2022-01-20 11:46:28 +0000 |
commit | 5a12024b95e4bdac8719f18a0e58c692aa471534 (patch) | |
tree | 9a21c8b7daed1a90946e14f975f6922b8ac427b6 /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 770353cd94f829f5013e21d8846d516b8cb095a2 (diff) | |
download | llvm-5a12024b95e4bdac8719f18a0e58c692aa471534.zip llvm-5a12024b95e4bdac8719f18a0e58c692aa471534.tar.gz llvm-5a12024b95e4bdac8719f18a0e58c692aa471534.tar.bz2 |
[RISCV] Optimize lowering of floating-point -0.0
This idea has come up in several reviews -- D115978 and D105902 -- so I
can't take any credit for the idea. Instead of using a constant pool to
lower -0.0, we can emit a sequence of two instructions:
fmv.[hwd].x freg, zero
fsgnjn.[hsd] freg, freg, freg
This is only done when the floating-point type is legal.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D117687
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions