[PATCH] D152794: [AMDGPU][GlobalISel] Shaders can only call amdgpu_gfx
Diana Picus via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 02:58:04 PDT 2023
rovka created this revision.
Herald added subscribers: foad, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: All.
rovka requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
SelectionDAG does not allow calls:
- to shaders
- from shaders to functions with calling conventions other than amdgpu_gfx
This patch essentially copies that code into GlobalISel and enables one
of the existing SelectionDAG tests for GlobalISel as well (with a couple
of FIXMEs not tackled in this patch).
It also removes an existing test that was added in
https://reviews.llvm.org/D117479
citing llvm-reduce's penchant for replacing calls to intrinsics with
calls to undef/null (while keeping the default, C calling convention).
That sounds like an important use case, but maybe a better solution for
that problem would be to teach llvm-reduce to replace the whole call
with an undef/null. (Since intrinsics often don't get lowered to calls
at all, replacing an intrinsic with a call would increases complexity rather
than reduce it.)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152794
Files:
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call.ll
llvm/test/CodeGen/AMDGPU/unsupported-calls.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152794.530840.patch
Type: text/x-patch
Size: 6496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230613/cd56a798/attachment.bin>
More information about the llvm-commits
mailing list