[PATCH] D124163: AMDGPU/GlobalISel: Fix isVCC for uniform s1 with reg class on wave32

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 05:45:52 PDT 2022


Petar.Avramovic created this revision.
Petar.Avramovic added reviewers: foad, arsenm.
Herald added subscribers: hsmhsm, kerbowa, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: All.
Petar.Avramovic requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Fix isVCC for register that was assigned register class during
inst-selection. This happens when register has multiple uses.
For wave32, uniform i1 to vcc copy was selected like vcc to vcc
copy when uniform i1 had assigned register class.
Uniform i1 register with assigned register class will have s1 LLT,
be defined using G_TRUNC and class will be SReg_32RegClass.
Vcc i1 register with assigned register class will have s1 LLT,
class will be SReg_32RegClass for wave32 and SReg_64RegClass for
wave64 and register will not be defined by G_TRUNC.


https://reviews.llvm.org/D124163

Files:
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/fshl.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/i1-copy.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-i1-copy.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124163.424167.patch
Type: text/x-patch
Size: 12940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220421/d0f609b0/attachment.bin>


More information about the llvm-commits mailing list