Skip to content

Commit 65361ff

Browse files
authored
[AMDGPU] Use SubtargetPredicate instead of OtherPredicates for subtarget predication. (#100715)
1 parent d3ecb16 commit 65361ff

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

llvm/lib/Target/AMDGPU/SMInstructions.td

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -950,20 +950,20 @@ multiclass SMLoad_Pattern <string Instr, ValueType vt, bit immci = true> {
950950
(vt (SIsbuffer_load v4i32:$sbase, (SMRDBufferImm32 i32:$offset), timm:$cachepolicy)),
951951
(!cast<InstSI>(Instr#"_IMM_ci") SReg_128:$sbase, smrd_literal_offset:$offset,
952952
(extract_cpol $cachepolicy))> {
953-
let OtherPredicates = [isGFX7Only];
953+
let SubtargetPredicate = isGFX7Only;
954954
let AddedComplexity = 1;
955955
}
956956

957957
// 3. Offset loaded in an 32bit SGPR
958958
def : GCNPat <
959959
(SIsbuffer_load v4i32:$sbase, i32:$soffset, timm:$cachepolicy),
960960
(vt (!cast<SM_Pseudo>(Instr#"_SGPR") SReg_128:$sbase, SReg_32:$soffset, (extract_cpol $cachepolicy)))> {
961-
let OtherPredicates = [isNotGFX9Plus];
961+
let SubtargetPredicate = isNotGFX9Plus;
962962
}
963963
def : GCNPat <
964964
(SIsbuffer_load v4i32:$sbase, i32:$soffset, timm:$cachepolicy),
965965
(vt (!cast<SM_Pseudo>(Instr#"_SGPR_IMM") SReg_128:$sbase, SReg_32:$soffset, 0, (extract_cpol $cachepolicy)))> {
966-
let OtherPredicates = [isGFX9Plus];
966+
let SubtargetPredicate = isGFX9Plus;
967967
}
968968

969969
// 4. Offset as an 32-bit SGPR + immediate
@@ -972,7 +972,7 @@ multiclass SMLoad_Pattern <string Instr, ValueType vt, bit immci = true> {
972972
timm:$cachepolicy),
973973
(vt (!cast<SM_Pseudo>(Instr#"_SGPR_IMM") SReg_128:$sbase, SReg_32:$soffset, i32imm:$offset,
974974
(extract_cpol $cachepolicy)))> {
975-
let OtherPredicates = [isGFX9Plus];
975+
let SubtargetPredicate = isGFX9Plus;
976976
}
977977
}
978978

@@ -981,28 +981,28 @@ multiclass ScalarLoadWithExtensionPat <string Instr, SDPatternOperator node, Val
981981
def : GCNPat <
982982
(node (SMRDImm i64:$sbase, i32:$offset)),
983983
(vt (!cast<SM_Pseudo>(Instr#"_IMM") $sbase, $offset, 0))>{
984-
let OtherPredicates = [isGFX12Plus];
984+
let SubtargetPredicate = isGFX12Plus;
985985
}
986986

987987
// 2. SGPR offset
988988
def : GCNPat <
989989
(node (SMRDSgpr i64:$sbase, i32:$soffset)),
990990
(vt (!cast<SM_Pseudo>(Instr#"_SGPR_IMM") $sbase, $soffset, 0, 0))>{
991-
let OtherPredicates = [isGFX12Plus];
991+
let SubtargetPredicate = isGFX12Plus;
992992
}
993993

994994
// 3. SGPR+IMM offset
995995
def : GCNPat <
996996
(node (SMRDSgprImm i64:$sbase, i32:$soffset, i32:$offset)),
997997
(vt (!cast<SM_Pseudo>(Instr#"_SGPR_IMM") $sbase, $soffset, $offset, 0))>{
998-
let OtherPredicates = [isGFX12Plus];
998+
let SubtargetPredicate = isGFX12Plus;
999999
}
10001000

10011001
// 4. No offset
10021002
def : GCNPat <
10031003
(vt (node (i64 SReg_64:$sbase))),
10041004
(vt (!cast<SM_Pseudo>(Instr#"_IMM") i64:$sbase, 0, 0))>{
1005-
let OtherPredicates = [isGFX12Plus];
1005+
let SubtargetPredicate = isGFX12Plus;
10061006
}
10071007
}
10081008

@@ -1012,14 +1012,14 @@ multiclass ScalarBufferLoadIntrinsicPat <SDPatternOperator name, string Instr> {
10121012
def : GCNPat <
10131013
(name v4i32:$sbase, (SMRDBufferImm i32:$offset), timm:$cachepolicy),
10141014
(i32 (!cast<SM_Pseudo>(Instr#"_IMM") SReg_128:$sbase, i32imm:$offset, (extract_cpol $cachepolicy)))> {
1015-
let OtherPredicates = [isGFX12Plus];
1015+
let SubtargetPredicate = isGFX12Plus;
10161016
}
10171017

10181018
// 2. Offset as an 32-bit SGPR
10191019
def : GCNPat <
10201020
(name v4i32:$sbase, i32:$soffset, timm:$cachepolicy),
10211021
(i32 (!cast<SM_Pseudo>(Instr#"_SGPR_IMM") SReg_128:$sbase, SReg_32:$soffset, 0, (extract_cpol $cachepolicy)))> {
1022-
let OtherPredicates = [isGFX12Plus];
1022+
let SubtargetPredicate = isGFX12Plus;
10231023
}
10241024

10251025
// 3. Offset as an 32-bit SGPR + immediate
@@ -1028,7 +1028,7 @@ multiclass ScalarBufferLoadIntrinsicPat <SDPatternOperator name, string Instr> {
10281028
timm:$cachepolicy),
10291029
(i32 (!cast<SM_Pseudo>(Instr#"_SGPR_IMM") SReg_128:$sbase, SReg_32:$soffset, i32imm:$offset,
10301030
(extract_cpol $cachepolicy)))> {
1031-
let OtherPredicates = [isGFX12Plus];
1031+
let SubtargetPredicate = isGFX12Plus;
10321032
}
10331033
}
10341034

0 commit comments

Comments
 (0)