Skip to content

Commit 9ddc31d

Browse files
authored
[AMDGPU] New GFX12 aliases lds_direct_load and lds_param_load (#119205)
This is for compatibility with SP3.
1 parent 0e34f3f commit 9ddc31d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

llvm/lib/Target/AMDGPU/DSDIRInstructions.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,8 @@ multiclass DSDIR_Real_gfx12<bits<2> op> {
193193

194194
defm DS_PARAM_LOAD : DSDIR_Real_gfx12<0x0>;
195195
defm DS_DIRECT_LOAD : DSDIR_Real_gfx12<0x1>;
196+
197+
let SubtargetPredicate = isGFX12Plus in {
198+
def : AMDGPUMnemonicAlias<"lds_param_load", "ds_param_load">;
199+
def : AMDGPUMnemonicAlias<"lds_direct_load", "ds_direct_load">;
200+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --version 5
2+
// RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -show-encoding %s | FileCheck -check-prefix=GFX12 %s
3+
4+
lds_direct_load v0
5+
// GFX12: ds_direct_load v0 wait_va_vdst:0 wait_vm_vsrc:0 ; encoding: [0x00,0x00,0x10,0xce]
6+
7+
lds_param_load v0, attr0.x
8+
// GFX12: ds_param_load v0, attr0.x wait_va_vdst:0 wait_vm_vsrc:0 ; encoding: [0x00,0x00,0x00,0xce]

0 commit comments

Comments
 (0)