[PATCH] D67352: AMDGPU: Use PatFrags to allow selecting custom nodes or intrinsics

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 07:45:53 PDT 2019


arsenm created this revision.
arsenm added reviewers: rampitec, nhaehnle, kerbowa.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl.

This enables GlobalISel to handle various intrinsics. The custom node
pattern will be ignored, and the intrinsic will work. This will also
allow SelectionDAG to directly select the intrinsics, but as they are
all custom lowered to the nodes, this ends up leaving dead code in the
table.

      

Eventually either GlobalISel should add the equivalent of custom nodes
equivalent, or intrinsics should be directly used. These each have
different tradeoffs.

      

There are a few more to handle, but these are easy to handle
ones. Some others fail for other reasons.


https://reviews.llvm.org/D67352

Files:
  lib/Target/AMDGPU/AMDGPUInstrInfo.td
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.cos.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.cos.s16.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.fract.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.fract.s16.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.ldexp.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.ldexp.s16.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rcp.legacy.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rcp.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rcp.s16.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rsq.clamp.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rsq.legacy.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rsq.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.rsq.s16.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.sin.mir
  test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.sin.s16.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67352.219353.patch
Type: text/x-patch
Size: 40354 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190909/7f10c614/attachment.bin>


More information about the llvm-commits mailing list