diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-05-16 13:15:27 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-05-16 13:15:27 +0000 |
commit | 73643b5041bbd90bc622b44fb50f0f9c15b6c8ce (patch) | |
tree | 198c3c17b093710d3009e1ed1d4f71dc25221494 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 2120748f770d9cd6c5ea8fd6f051c5c1ad425756 (diff) | |
download | llvm-73643b5041bbd90bc622b44fb50f0f9c15b6c8ce.zip llvm-73643b5041bbd90bc622b44fb50f0f9c15b6c8ce.tar.gz llvm-73643b5041bbd90bc622b44fb50f0f9c15b6c8ce.tar.bz2 |
[CodeGen] Add lround/llround builtins
This patch add the ISD::LROUND and ISD::LLROUND along with new
intrinsics. The changes are straightforward as for other
floating-point rounding functions, with just some adjustments
required to handle the return value being an interger.
The idea is to optimize lround/llround generation for AArch64
in a subsequent patch. Current semantic is just route it to libm
symbol.
llvm-svn: 360889
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 661674f..eeb8aa1 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -710,6 +710,8 @@ void TargetLoweringBase::initActions() { setOperationAction(ISD::FRINT, VT, Expand); setOperationAction(ISD::FTRUNC, VT, Expand); setOperationAction(ISD::FROUND, VT, Expand); + setOperationAction(ISD::LROUND, VT, Expand); + setOperationAction(ISD::LLROUND, VT, Expand); } // Default ISD::TRAP to expand (which turns it into abort). |