[PATCH] D139433: [amdgpu] Reimplement LDS lowering
Jon Chesterfield via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 08:45:29 PST 2022
JonChesterfield added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/addrspacecast-known-non-null.ll:28
; CHECK: s_mov_b64 s[{{[0-9]+}}:[[HIREG:[0-9]+]]], src_shared_base
-; CHECK: v_mov_b32_e32 v0, 0
; CHECK: v_mov_b32_e32 v1, s[[HIREG]]
----------------
cdevadas wrote:
> Why this write to v0 is gone now?
> The code looks broken without defining v0 before swappc is called.
This is a function which is reachable by no kernel, thus ignored by the pass that lowers LDS globals. There's no kernel to put the LDS variable into. It'll compile with a warning from llc and replacing the use of the variable with undef.
Making this function a kernel, or making it reachable from a kernel, will have the effect of allocating the LDS variable (and avoiding the warning from the back end).
Codegen for this function should be identical with the LDS lowering pass enabled or disabled.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139433/new/
https://reviews.llvm.org/D139433
More information about the llvm-commits
mailing list