[PATCH] D101448: AMDGPU/GlobalISel: Fix selection of image intrinsics with unused return
Petar Avramovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 05:57:49 PDT 2021
Petar.Avramovic created this revision.
Petar.Avramovic added reviewers: foad, arsenm.
Herald added subscribers: kerbowa, jfb, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, nhaehnle, jvesely, kzhuravl.
Petar.Avramovic requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
When atomic image intrinsic return value is unused, register class for
destination of a sub-register copy of return value ends up not being set.
This copy then hits 'Register class not set' assert later.
If return value has uses, register class is determined by use instruction.
Fix is to not create sub-register copy when image intrinsic destination has
no uses because it would be deleted by dead-mi-elimination later anyway.
https://reviews.llvm.org/D101448
Files:
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.atomic.dim.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.atomic.dim.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101448.341169.patch
Type: text/x-patch
Size: 16635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210428/35f15433/attachment.bin>
More information about the llvm-commits
mailing list