Skip to content

Commit 2550a63

Browse files
authored
AMDGPU: Remove LDS-direct(param)-loads and VINTERP ops from gfx1250 support (#145631)
1 parent 494a748 commit 2550a63

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

llvm/lib/Target/AMDGPU/AMDGPU.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2364,7 +2364,7 @@ def HasExportInsts : Predicate<"Subtarget->hasExportInsts()">,
23642364
AssemblerPredicate<(all_of (not FeatureGFX90AInsts), (not FeatureGFX1250Insts))>;
23652365

23662366
def HasVINTERPEncoding : Predicate<"Subtarget->hasVINTERPEncoding()">,
2367-
AssemblerPredicate<(all_of FeatureGFX11Insts)>;
2367+
AssemblerPredicate<(all_of FeatureGFX11Insts, (not FeatureGFX1250Insts))>;
23682368

23692369
def HasDSAddTid : Predicate<"Subtarget->getGeneration() >= AMDGPUSubtarget::GFX9">,
23702370
AssemblerPredicate<(all_of FeatureGFX9Insts)>;

llvm/lib/Target/AMDGPU/DSDIRInstructions.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def : GCNPat <
141141

142142
} // End SubtargetPredicate = isGFX11Only
143143

144-
let SubtargetPredicate = isGFX12Plus in {
144+
let SubtargetPredicate = isGFX12PlusNot12_50 in {
145145

146146
def DS_DIRECT_LOAD : DSDIR_Pseudo<"ds_direct_load", VDSDIR_getIns<1>.ret, 1>;
147147
def DS_PARAM_LOAD : DSDIR_Pseudo<"ds_param_load", VDSDIR_getIns<0>.ret, 0>;
@@ -156,7 +156,7 @@ def : GCNPat <
156156
(DS_PARAM_LOAD timm:$attr, timm:$attrchan, 0, 1)
157157
>;
158158

159-
} // End SubtargetPredicate = isGFX12Only
159+
} // End SubtargetPredicate = isGFX12PlusNot12_50.
160160

161161
//===----------------------------------------------------------------------===//
162162
// GFX11

llvm/lib/Target/AMDGPU/GCNSubtarget.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,7 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
697697
return !hasGFX940Insts() && !hasGFX1250Insts();
698698
}
699699

700-
bool hasVINTERPEncoding() const {
701-
return GFX11Insts;
702-
}
700+
bool hasVINTERPEncoding() const { return GFX11Insts && !hasGFX1250Insts(); }
703701

704702
// DS_ADD_F64/DS_ADD_RTN_F64
705703
bool hasLdsAtomicAddF64() const { return hasGFX90AInsts(); }

llvm/test/MC/AMDGPU/gfx1250_asm_unsupported.s

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
; RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1250 -show-encoding %s 2>&1 | FileCheck --check-prefix=GFX1250-ERR --implicit-check-not=error: --strict-whitespace %s
22

3+
;; LDS-direct and parameter-load, VINTERP
4+
5+
ds_direct_load v1 wait_va_vdst:15
6+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
7+
8+
ds_param_load v1, attr0.x wait_va_vdst:15
9+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
10+
11+
ds_direct_load v1 wait_va_vdst:15 wait_vm_vsrc:1
12+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
13+
14+
ds_param_load v1, attr0.x wait_va_vdst:15 wait_vm_vsrc:1
15+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
16+
17+
v_interp_p10_f32 v0, v1, v2, v3
18+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
19+
20+
v_interp_p2_f32 v0, v1, v2, v3
21+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
22+
23+
v_interp_p10_f16_f32 v0, v1, v2, v3
24+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
25+
26+
v_interp_p2_f16_f32 v0, v1, v2, v3
27+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
28+
29+
v_interp_p10_rtz_f16_f32 v0, v1, v2, v3
30+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
31+
32+
v_interp_p2_rtz_f16_f32 v0, v1, v2, v3
33+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
34+
335
;; Export, S_WAIT_EXPCNT and S_WAIT_EVENT
436

537
export mrt0 off, off, off, off

0 commit comments

Comments
 (0)