[PATCH] D157679: [AArch64][GISel] Extend lowering for fp round intrinsics.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 23:50:18 PDT 2023


dmgreen created this revision.
dmgreen added reviewers: aemerson, arsenm, stuij, chuongg3.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This extends the lowering of ceil, floor, nearbyint, rint, round, roundeven and trunc. They are all very similar, so can reuse the same legalization info. selectIntrinsicTrunc and selectIntrinsicRound can be removed as they can be selected via tablegen patterns, and G_INTRINSIC_ROUNDEVEN is marked as a gisel equivalent of froundeven. Otherwise this reuses the existing code, filling it out to handle more types.


https://reviews.llvm.org/D157679

Files:
  llvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td
  llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
  llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-ceil.mir
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-frint.mir
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-intrinsic-round.mir
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-intrinsic-roundeven.mir
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-intrinsic-trunc.mir
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-nearbyint.mir
  llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
  llvm/test/CodeGen/AArch64/fcvt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157679.549259.patch
Type: text/x-patch
Size: 162224 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230811/bd469401/attachment.bin>


More information about the llvm-commits mailing list