Details
- Reviewers
arsenm - Commits
- rGbf579a7049a6: [amdgpu] Change LDS lowering default to hybrid
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | ||
---|---|---|
1331–1343 | This is latent because the module lds variable is always lowered to zero and the path through codegen coincidentally picks zero for it. It breaks on the "kernel" lowering strategy because that can reference variables that aren't at zero directly, and breaks on the "hybrid" lowering when it happens to pick the "kernel" strategy for a variable allocated by a kernel which does not use the "module" scope variable. Still, relying on unspecified -> zero is bad. Planning to add a test case for this behaviour change (it won't show up in codegen that picks zero anyway, but should do for codegen where zero was not the right answer) |
Checked in the new test case (codegen for hybrid path, previously only checking IR) before this patch in order to highlight the s_trap -> working change. Will commit this as is to catch up with rocm and then change to absolute_symbols (as in D144221), patching trunk first so that rocm picks up the change without manual intervention.
This is latent because the module lds variable is always lowered to zero and the path through codegen coincidentally picks zero for it. It breaks on the "kernel" lowering strategy because that can reference variables that aren't at zero directly, and breaks on the "hybrid" lowering when it happens to pick the "kernel" strategy for a variable allocated by a kernel which does not use the "module" scope variable.
Still, relying on unspecified -> zero is bad. Planning to add a test case for this behaviour change (it won't show up in codegen that picks zero anyway, but should do for codegen where zero was not the right answer)