Skip to content

[AMDGPU] Rename TH_STORE_RT_WB to TH_STORE_WB #135171

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

Merged
merged 1 commit into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6776,7 +6776,7 @@ ParseStatus AMDGPUAsmParser::parseTH(OperandVector &Operands, int64_t &TH) {

if (Value == "TH_DEFAULT")
TH = AMDGPU::CPol::TH_RT;
else if (Value == "TH_STORE_LU" || Value == "TH_LOAD_RT_WB" ||
else if (Value == "TH_STORE_LU" || Value == "TH_LOAD_WB" ||
Value == "TH_LOAD_NT_WB") {
return Error(StringLoc, "invalid th value");
} else if (Value.consume_front("TH_ATOMIC_")) {
Expand Down Expand Up @@ -6811,7 +6811,7 @@ ParseStatus AMDGPUAsmParser::parseTH(OperandVector &Operands, int64_t &TH) {
.Case("NT", AMDGPU::CPol::TH_NT)
.Case("HT", AMDGPU::CPol::TH_HT)
.Case("LU", AMDGPU::CPol::TH_LU)
.Case("RT_WB", AMDGPU::CPol::TH_RT_WB)
.Case("WB", AMDGPU::CPol::TH_WB)
.Case("NT_RT", AMDGPU::CPol::TH_NT_RT)
.Case("RT_NT", AMDGPU::CPol::TH_RT_NT)
.Case("NT_HT", AMDGPU::CPol::TH_NT_HT)
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ void AMDGPUInstPrinter::printTH(const MCInst *MI, int64_t TH, int64_t Scope,
case AMDGPU::CPol::TH_HT:
O << "HT";
break;
case AMDGPU::CPol::TH_BYPASS: // or LU or RT_WB
case AMDGPU::CPol::TH_BYPASS: // or LU or WB
O << (Scope == AMDGPU::CPol::SCOPE_SYS ? "BYPASS"
: (IsStore ? "RT_WB" : "LU"));
: (IsStore ? "WB" : "LU"));
break;
case AMDGPU::CPol::TH_NT_RT:
O << "NT_RT";
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/AMDGPU/SIDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ enum CPol {
TH_NT = 1, // non-temporal
TH_HT = 2, // high-temporal
TH_LU = 3, // last use
TH_RT_WB = 3, // regular (CU, SE), high-temporal with write-back (MALL)
TH_WB = 3, // regular (CU, SE), high-temporal with write-back (MALL)
TH_NT_RT = 4, // non-temporal (CU, SE), regular (MALL)
TH_RT_NT = 5, // regular (CU, SE), non-temporal (MALL)
TH_NT_HT = 6, // non-temporal (CU, SE), high-temporal (MALL)
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.a16.dim.ll
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdat
;
; GFX12-LABEL: store_1d_glc_slc:
; GFX12: ; %bb.0: ; %main_body
; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_RT_WB a16
; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_WB a16
; GFX12-NEXT: s_endpgm
main_body:
%s = extractelement <2 x i16> %coords, i32 0
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.a16.encode.ll
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdat
;
; GFX12-LABEL: store_1d_glc_slc:
; GFX12: ; %bb.0: ; %main_body
; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_RT_WB a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x30,0x00,0x04,0x00,0x00,0x00]
; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_WB a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x30,0x00,0x04,0x00,0x00,0x00]
; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf]
main_body:
%s = extractelement <2 x i16> %coords, i32 0
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.dim.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3837,7 +3837,7 @@ define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdat
;
; GFX12-LABEL: store_1d_glc_slc:
; GFX12: ; %bb.0: ; %main_body
; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_RT_WB
; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_WB
; GFX12-NEXT: s_endpgm
main_body:
call void @llvm.amdgcn.image.store.1d.v4f32.i32(<4 x float> %vdata, i32 15, i32 %s, <8 x i32> %rsrc, i32 0, i32 3)
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MC/AMDGPU/gfx12_asm_vimage.s
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_NT
image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_HT
// GFX12: encoding: [0x00,0x80,0x41,0xd0,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00]

image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_RT_WB
image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_WB
// GFX12: encoding: [0x00,0x80,0x41,0xd0,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00]

image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_NT_RT
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/MC/AMDGPU/gfx12_err.s
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ image_atomic_swap v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_NT
image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_LU
// GFX12-ERR: [[@LINE-1]]:{{[0-9]+}}: error: invalid th value

image_load v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_LOAD_RT_WB
image_load v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_LOAD_WB
// GFX12-ERR: [[@LINE-1]]:{{[0-9]+}}: error: invalid th value

image_load v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_LOAD_NT_WB
// GFX12-ERR: [[@LINE-1]]:{{[0-9]+}}: error: invalid th value

image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_RT_WB scope:SCOPE_SYS
image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_WB scope:SCOPE_SYS
// GFX12-ERR: [[@LINE-1]]:{{[0-9]+}}: error: scope and th combination is not valid

image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_BYPASS scope:SCOPE_DEV
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MC/Disassembler/AMDGPU/gfx12_dasm_vimage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
# GFX12: image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_HT ; encoding: [0x00,0x80,0x41,0xd0,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00]
0x00,0x80,0x41,0xd0,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00

# GFX12: image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_RT_WB ; encoding: [0x00,0x80,0x41,0xd0,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00]
# GFX12: image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_WB ; encoding: [0x00,0x80,0x41,0xd0,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00]
0x00,0x80,0x41,0xd0,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00

# GFX12: image_store v0, v0, s[0:7] dmask:0x1 dim:SQ_RSRC_IMG_1D th:TH_STORE_NT_RT ; encoding: [0x00,0x80,0x41,0xd0,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00]
Expand Down