Skip to content

Commit

Permalink
[AMDGPU] New GFX12 aliases lds_direct_load and lds_param_load (#119205)
Browse files Browse the repository at this point in the history
This is for compatibility with SP3.
  • Loading branch information
jayfoad authored Dec 9, 2024
1 parent 0e34f3f commit 9ddc31d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/lib/Target/AMDGPU/DSDIRInstructions.td
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,8 @@ multiclass DSDIR_Real_gfx12<bits<2> op> {

defm DS_PARAM_LOAD : DSDIR_Real_gfx12<0x0>;
defm DS_DIRECT_LOAD : DSDIR_Real_gfx12<0x1>;

let SubtargetPredicate = isGFX12Plus in {
def : AMDGPUMnemonicAlias<"lds_param_load", "ds_param_load">;
def : AMDGPUMnemonicAlias<"lds_direct_load", "ds_direct_load">;
}
8 changes: 8 additions & 0 deletions llvm/test/MC/AMDGPU/gfx12_asm_vdsdir_alias.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --version 5
// RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -show-encoding %s | FileCheck -check-prefix=GFX12 %s

lds_direct_load v0
// GFX12: ds_direct_load v0 wait_va_vdst:0 wait_vm_vsrc:0 ; encoding: [0x00,0x00,0x10,0xce]

lds_param_load v0, attr0.x
// GFX12: ds_param_load v0, attr0.x wait_va_vdst:0 wait_vm_vsrc:0 ; encoding: [0x00,0x00,0x00,0xce]

0 comments on commit 9ddc31d

Please sign in to comment.