[PATCH] D151105: [AMDGPU] Fix lowering of @llvm.amdgcn.set.inactive(imm, poison)

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 07:45:16 PDT 2023


foad created this revision.
foad added reviewers: AMDGPU, critson.
Herald added subscribers: StephenFan, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: All.
foad requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

If the second argument of V_SET_INACTIVE is undef/poison,
SIWholeQuadMode lowered it to a COPY from the first argument, but that
caused invalid MIR if the first argument was an immediate rather than a
register.

Fix this by lowering to a V_MOV instruction instead of a COPY.

Fixes https://github.com/llvm/llvm-project/issues/62862


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151105

Files:
  llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
  llvm/test/CodeGen/AMDGPU/llvm.amdgcn.set.inactive.ll
  llvm/test/CodeGen/AMDGPU/wqm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151105.524309.patch
Type: text/x-patch
Size: 6353 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230522/1ab8e240/attachment.bin>


More information about the llvm-commits mailing list