Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMDGPU] Remove s_set_inst_prefetch_distance support from GFX12 #78786

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

rampitec
Copy link
Collaborator

This instruction is not supported by GFX12.

This instruction is not supported by GFX12.
@llvmbot llvmbot added backend:AMDGPU mc Machine (object) code labels Jan 19, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jan 19, 2024

@llvm/pr-subscribers-mc

@llvm/pr-subscribers-backend-amdgpu

Author: Stanislav Mekhanoshin (rampitec)

Changes

This instruction is not supported by GFX12.


Full diff: https://github.com/llvm/llvm-project/pull/78786.diff

3 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/SOPInstructions.td (+1-1)
  • (modified) llvm/test/MC/AMDGPU/gfx12_asm_sopp.s (-9)
  • (modified) llvm/test/MC/Disassembler/AMDGPU/gfx12_dasm_sopp.txt (-9)
diff --git a/llvm/lib/Target/AMDGPU/SOPInstructions.td b/llvm/lib/Target/AMDGPU/SOPInstructions.td
index eae4800ade0dce..2ce5851090ef87 100644
--- a/llvm/lib/Target/AMDGPU/SOPInstructions.td
+++ b/llvm/lib/Target/AMDGPU/SOPInstructions.td
@@ -2618,7 +2618,7 @@ multiclass SOPP_Real_With_Relaxation_gfx11_gfx12<bits<7>op> :
 defm S_SETKILL                    : SOPP_Real_32_gfx11_gfx12<0x001>;
 defm S_SETHALT                    : SOPP_Real_32_gfx11_gfx12<0x002>;
 defm S_SLEEP                      : SOPP_Real_32_gfx11_gfx12<0x003>;
-defm S_SET_INST_PREFETCH_DISTANCE : SOPP_Real_32_Renamed_gfx11_gfx12<0x004, S_INST_PREFETCH, "s_set_inst_prefetch_distance">;
+defm S_SET_INST_PREFETCH_DISTANCE : SOPP_Real_32_Renamed_gfx11<0x004, S_INST_PREFETCH, "s_set_inst_prefetch_distance">;
 defm S_CLAUSE                     : SOPP_Real_32_gfx11_gfx12<0x005>;
 defm S_DELAY_ALU                  : SOPP_Real_32_gfx11_gfx12<0x007>;
 defm S_WAITCNT_DEPCTR             : SOPP_Real_32_gfx11<0x008>;
diff --git a/llvm/test/MC/AMDGPU/gfx12_asm_sopp.s b/llvm/test/MC/AMDGPU/gfx12_asm_sopp.s
index 41ed4de6be8a72..f6c7c99847d664 100644
--- a/llvm/test/MC/AMDGPU/gfx12_asm_sopp.s
+++ b/llvm/test/MC/AMDGPU/gfx12_asm_sopp.s
@@ -69,15 +69,6 @@ s_wait_alu depctr_va_sdst(3)
 s_wait_alu depctr_va_vdst(14) depctr_va_sdst(6) depctr_vm_vsrc(6)
 // GFX12: encoding: [0x9b,0xed,0x88,0xbf]
 
-s_inst_prefetch 0x1234
-// GFX12: s_set_inst_prefetch_distance 0x1234 ; encoding: [0x34,0x12,0x84,0xbf]
-
-s_set_inst_prefetch_distance 0x1234
-// GFX12: s_set_inst_prefetch_distance 0x1234 ; encoding: [0x34,0x12,0x84,0xbf]
-
-s_set_inst_prefetch_distance 0xc1d1
-// GFX12: s_set_inst_prefetch_distance 0xc1d1 ; encoding: [0xd1,0xc1,0x84,0xbf]
-
 s_singleuse_vdst 0x0000
 // GFX12: encoding: [0x00,0x00,0x93,0xbf]
 
diff --git a/llvm/test/MC/Disassembler/AMDGPU/gfx12_dasm_sopp.txt b/llvm/test/MC/Disassembler/AMDGPU/gfx12_dasm_sopp.txt
index 6f4dc2423487e2..ea547fcd5d0ecf 100644
--- a/llvm/test/MC/Disassembler/AMDGPU/gfx12_dasm_sopp.txt
+++ b/llvm/test/MC/Disassembler/AMDGPU/gfx12_dasm_sopp.txt
@@ -264,15 +264,6 @@
 # GFX12: s_sethalt 0xc1d1                        ; encoding: [0xd1,0xc1,0x82,0xbf]
 0xd1,0xc1,0x82,0xbf
 
-# GFX12: s_set_inst_prefetch_distance 0x0        ; encoding: [0x00,0x00,0x84,0xbf]
-0x00,0x00,0x84,0xbf
-
-# GFX12: s_set_inst_prefetch_distance 0x1234     ; encoding: [0x34,0x12,0x84,0xbf]
-0x34,0x12,0x84,0xbf
-
-# GFX12: s_set_inst_prefetch_distance 0xc1d1     ; encoding: [0xd1,0xc1,0x84,0xbf]
-0xd1,0xc1,0x84,0xbf
-
 # GFX12: s_setkill 0                             ; encoding: [0x00,0x00,0x81,0xbf]
 0x00,0x00,0x81,0xbf
 

Copy link
Contributor

@jayfoad jayfoad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update (or remove) the comment in GCNSubtarget::hasInstPrefetch.

llvm/test/MC/AMDGPU/gfx12_asm_sopp.s Show resolved Hide resolved
@rampitec
Copy link
Collaborator Author

Please update (or remove) the comment in GCNSubtarget::hasInstPrefetch.

Done.

@rampitec rampitec merged commit 1000cef into llvm:main Jan 22, 2024
3 of 4 checks passed
@rampitec rampitec deleted the s_set_inst_prefetch_distance branch January 22, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AMDGPU mc Machine (object) code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants