summaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/TextStubCommon.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2022-01-11 08:55:45 -0800
committerCraig Topper <craig.topper@sifive.com>2022-01-11 09:05:57 -0800
commitbe1cc64cc13cb24bcd9ed097925a140d74beaa45 (patch)
treea74626760c6ac2952e48abb0bf97c65928a8d1e0 /llvm/lib/TextAPI/TextStubCommon.cpp
parent4b14fc6fe5a7d01fb42a3cdede77c59f03b867af (diff)
downloadllvm-be1cc64cc13cb24bcd9ed097925a140d74beaa45.tar.gz
[RISCV] Add DAG combine to fold (fp_to_int (ffloor X)) -> (fcvt X, rdn)
Similar for ceil, trunc, round, and roundeven. This allows us to use static rounding modes to avoid a libcall. This optimization is done for AArch64 as isel patterns. RISCV doesn't have instructions for ceil/floor/trunc/round/roundeven so the operations don't stick around until isel to enable a pattern match. Thus I've implemented a DAG combine. We only handle XLen types except i32 on RV64. i32 will be type legalized to a RISCVISD node. All other types will be type legalized to XLen and maintain the FP_TO_SINT/UINT ISD opcode. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D116771
Diffstat (limited to 'llvm/lib/TextAPI/TextStubCommon.cpp')
0 files changed, 0 insertions, 0 deletions