]> granicus.if.org Git - llvm/commit
[CodeGen] Add lrint/llrint builtins
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 28 May 2019 20:47:44 +0000 (20:47 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 28 May 2019 20:47:44 +0000 (20:47 +0000)
commit29f026d977e01fc255284a0bb90afda1435b0e6a
tree1518f9940fcc390b2f583a7489f054d7f9f1ea69
parentd96f9a2ce2cd1ffeaecab5d70bbece06ab644834
[CodeGen] Add lrint/llrint builtins

This patch add the ISD::LRINT and ISD::LLRINT 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 lrint/llrint generation for AArch64
in a subsequent patch.  Current semantic is just route it to libm
symbol.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D62017

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361875 91177308-0d34-0410-b5e6-96231b3b80d8
25 files changed:
docs/LangRef.rst
include/llvm/CodeGen/ISDOpcodes.h
include/llvm/IR/Intrinsics.td
include/llvm/IR/RuntimeLibcalls.def
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
lib/CodeGen/TargetLoweringBase.cpp
lib/IR/Verifier.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/AArch64/llrint-conv.ll [new file with mode: 0644]
test/CodeGen/AArch64/lrint-conv.ll [new file with mode: 0644]
test/CodeGen/ARM/llrint-conv.ll [new file with mode: 0644]
test/CodeGen/ARM/lrint-conv.ll [new file with mode: 0644]
test/CodeGen/Mips/llrint-conv.ll [new file with mode: 0644]
test/CodeGen/Mips/lrint-conv.ll [new file with mode: 0644]
test/CodeGen/PowerPC/llrint-conv.ll [new file with mode: 0644]
test/CodeGen/PowerPC/lrint-conv.ll [new file with mode: 0644]
test/CodeGen/X86/llrint-conv-i32.ll [new file with mode: 0644]
test/CodeGen/X86/llrint-conv.ll [new file with mode: 0644]
test/CodeGen/X86/lrint-conv-i32.ll [new file with mode: 0644]
test/CodeGen/X86/lrint-conv.ll [new file with mode: 0644]