[PATCH] D71287: [PowerPC] [RFC] exploit fcti[dw] instructions for lrint and llrint
Colin Samples via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 10:37:15 PST 2019
vddvss created this revision.
vddvss added reviewers: hfinkel, nemanjai, jsji, PowerPC.
vddvss added a project: LLVM.
Herald added subscribers: llvm-commits, shchenz, kbarton, hiraditya.
Not sure if folks are interested in this, but this patch adds support for lowering `lrint` and `llrint` intrinsics to `fcti[dw]` instructions.
This is inspired by `D68841`, which fixed an issue regarding support for `lrint` and `llrint` intrinsics.
This uses the existing fp-to-int infrastructure, and cleans up some of the logic in the logic for that.
AFAICT these instructions match the semantics of the C99/11 standard:
The lrint and llrint functions round their argument to the nearest integer
value, rounding according to the current rounding direction. If the rounded
value is outside the range of the return type, the numeric result is
unspecified and a domain error or range error may occur.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71287
Files:
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/llrint-conv.ll
llvm/test/CodeGen/PowerPC/lrint-conv.ll
llvm/test/CodeGen/PowerPC/pr43527.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71287.233139.patch
Type: text/x-patch
Size: 15280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191210/c7e3b111/attachment.bin>
More information about the llvm-commits
mailing list