diff options
author | Acim-Maravic <119684637+Acim-Maravic@users.noreply.github.com> | 2023-11-14 18:49:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 18:49:21 +0100 |
commit | f3138524db0f6c29cfdd47716450eb8c1956a04f (patch) | |
tree | 4fbaf16cdb6ab8f325dd41d144bfeade3e2f2d32 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | f2f3050476544e7a96ae5c3075427bb045b97187 (diff) | |
download | llvm-f3138524db0f6c29cfdd47716450eb8c1956a04f.zip llvm-f3138524db0f6c29cfdd47716450eb8c1956a04f.tar.gz llvm-f3138524db0f6c29cfdd47716450eb8c1956a04f.tar.bz2 |
[AMDGPU] Generic lowering for rint and nearbyint (#69596)
The are three different rounding intrinsics, that are brought down to
same instruction.
Co-authored-by: Acim Maravic <acim.maravic@amd.com>
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 7be1ebe..450317c 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -867,9 +867,8 @@ void TargetLoweringBase::initActions() { setOperationAction({ISD::BITREVERSE, ISD::PARITY}, VT, Expand); // These library functions default to expand. - setOperationAction( - {ISD::FROUND, ISD::FROUNDEVEN, ISD::FPOWI, ISD::FLDEXP, ISD::FFREXP}, - VT, Expand); + setOperationAction({ISD::FROUND, ISD::FPOWI, ISD::FLDEXP, ISD::FFREXP}, VT, + Expand); // These operations default to expand for vector types. if (VT.isVector()) @@ -928,7 +927,7 @@ void TargetLoweringBase::initActions() { setOperationAction({ISD::FCBRT, ISD::FLOG, ISD::FLOG2, ISD::FLOG10, ISD::FEXP, ISD::FEXP2, ISD::FEXP10, ISD::FFLOOR, ISD::FNEARBYINT, ISD::FCEIL, ISD::FRINT, ISD::FTRUNC, ISD::LROUND, - ISD::LLROUND, ISD::LRINT, ISD::LLRINT}, + ISD::LLROUND, ISD::LRINT, ISD::LLRINT, ISD::FROUNDEVEN}, {MVT::f32, MVT::f64, MVT::f128}, Expand); // Default ISD::TRAP to expand (which turns it into abort). |