[PATCH] D104574: AMDGPU: Fix high 16-bit optimization on gfx9

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 18 15:07:46 PDT 2021


arsenm created this revision.
arsenm added reviewers: rampitec, Joe_Nash, foad, kerbowa.
Herald added subscribers: hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

We can do this optimization in the majority of cases, but we currently
don't have a way to do it. We do not track/model which instructions
have which behavior, the control bit to change the high bit behavior,
or making use of preserved bits at all. This is a bit fuzzy since we
don't know precisely how the source instruction will be lowered, but
that only really matters in one case (for fma_mixlo).

      

We do need to fixup some of these cases after selection, but the
pattern helps eliminate many of these zexts.


https://reviews.llvm.org/D104574

Files:
  llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/test/CodeGen/AMDGPU/fptrunc.f16.ll
  llvm/test/CodeGen/AMDGPU/preserve-hi16.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104574.353109.patch
Type: text/x-patch
Size: 9815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210618/51d57062/attachment.bin>


More information about the llvm-commits mailing list