[PATCH] D72685: [PowerPC] Exploit VSX rounding instrs for rint

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 01:33:05 PST 2020


qiucf created this revision.
qiucf added reviewers: PowerPC, vddvss, kpn.
Herald added subscribers: llvm-commits, shchenz, jsji, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.

This patch exploits native VSX rounding instr, `x(v|s)r(d|s)pic`, which does rounding using current rounding mode.

According to C standard library document, `rint` may raise `INEXACT` exception while `nearbyint` won't.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72685

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCInstrVSX.td
  llvm/test/CodeGen/PowerPC/mi-peephole-splat.ll
  llvm/test/CodeGen/PowerPC/scalar-rounding-ops.ll
  llvm/test/CodeGen/PowerPC/vector-constrained-fp-intrinsics.ll
  llvm/test/CodeGen/PowerPC/vector-rounding-ops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72685.237882.patch
Type: text/x-patch
Size: 25632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200114/653cc574/attachment.bin>


More information about the llvm-commits mailing list