[PATCH] D80314: AMDGPU/GlobalISel: Fix assert on 16-bit G_EXTRACT results

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 10:54:47 PDT 2020


arsenm created this revision.
arsenm added reviewers: nhaehnle, kerbowa, foad.
Herald added subscribers: hiraditya, t-tye, Anastasia, tpr, dstuttard, rovka, yaxunl, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.

I consider this to be a hack, since we probably should not mark any
16-bit extract as legal, and require all extracts to be done on
multiples of 32. There are quite a few more battles to fight in the
legalizer for sub-dword vectors, so just select this for now so we can
pass OpenCL conformance without crashing.

      

Also fix the same assert for G_INSERTs. Unlike G_EXTRACT there's not a
trivial way to select this so just fail on it.


https://reviews.llvm.org/D80314

Files:
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-extract.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-insert.xfail.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80314.265299.patch
Type: text/x-patch
Size: 4302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200520/3992bf03/attachment-0001.bin>


More information about the llvm-commits mailing list