[PATCH] D121804: [AMDGPU] Define new feature HasFlatScratchSVSMode. NFC.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 12:59:49 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfb8d23b8e7d5: [AMDGPU] Define new feature HasFlatScratchSVSMode. NFC. (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121804/new/
https://reviews.llvm.org/D121804
Files:
llvm/lib/Target/AMDGPU/AMDGPU.td
llvm/lib/Target/AMDGPU/FLATInstructions.td
llvm/lib/Target/AMDGPU/GCNSubtarget.h
Index: llvm/lib/Target/AMDGPU/GCNSubtarget.h
===================================================================
--- llvm/lib/Target/AMDGPU/GCNSubtarget.h
+++ llvm/lib/Target/AMDGPU/GCNSubtarget.h
@@ -571,6 +571,8 @@
return hasFlatScratchInsts() && (hasGFX10_3Insts() || hasGFX940Insts());
}
+ bool hasFlatScratchSVSMode() const { return GFX940Insts; }
+
bool hasScalarFlatScratchInsts() const {
return ScalarFlatScratchInsts;
}
Index: llvm/lib/Target/AMDGPU/FLATInstructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/FLATInstructions.td
+++ llvm/lib/Target/AMDGPU/FLATInstructions.td
@@ -366,7 +366,7 @@
def _SADDR : FLAT_Scratch_Load_Pseudo<opName, regClass, HasTiedOutput, 1>,
FlatScratchInst<opName, "SS">;
- let SubtargetPredicate = isGFX940Plus in
+ let SubtargetPredicate = HasFlatScratchSVSMode in
def _SVS : FLAT_Scratch_Load_Pseudo<opName, regClass, HasTiedOutput, 1, 1>,
FlatScratchInst<opName, "SVS">;
@@ -383,7 +383,7 @@
def _SADDR : FLAT_Scratch_Store_Pseudo<opName, regClass, 1>,
FlatScratchInst<opName, "SS">;
- let SubtargetPredicate = isGFX940Plus in
+ let SubtargetPredicate = HasFlatScratchSVSMode in
def _SVS : FLAT_Scratch_Store_Pseudo<opName, regClass, 1, 1>,
FlatScratchInst<opName, "SVS">;
@@ -1272,7 +1272,7 @@
}
def : ScratchLoadSVaddrPat<!cast<FLAT_Pseudo>(!cast<string>(inst)#"_SVS"), node, vt> {
- let SubtargetPredicate = isGFX940Plus;
+ let SubtargetPredicate = HasFlatScratchSVSMode;
let AddedComplexity = 27;
}
}
@@ -1288,7 +1288,7 @@
}
def : ScratchStoreSVaddrPat<!cast<FLAT_Pseudo>(!cast<string>(inst)#"_SVS"), node, vt> {
- let SubtargetPredicate = isGFX940Plus;
+ let SubtargetPredicate = HasFlatScratchSVSMode;
let AddedComplexity = 27;
}
}
@@ -1303,7 +1303,7 @@
}
def : ScratchLoadSVaddrPat_D16 <!cast<FLAT_Pseudo>(!cast<string>(inst)#"_SVS"), node, vt> {
- let SubtargetPredicate = isGFX940Plus;
+ let SubtargetPredicate = HasFlatScratchSVSMode;
let AddedComplexity = 27;
}
}
Index: llvm/lib/Target/AMDGPU/AMDGPU.td
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPU.td
+++ llvm/lib/Target/AMDGPU/AMDGPU.td
@@ -1396,6 +1396,8 @@
def HasFlatScratchSTMode : Predicate<"Subtarget->hasFlatScratchSTMode()">,
AssemblerPredicate<(any_of FeatureGFX10_3Insts, FeatureGFX940Insts)>;
+def HasFlatScratchSVSMode : Predicate<"Subtarget->hasFlatScratchSVSMode()">,
+ AssemblerPredicate<(any_of FeatureGFX940Insts)>;
def HasGFX10_AEncoding : Predicate<"Subtarget->hasGFX10_AEncoding()">,
AssemblerPredicate<(all_of FeatureGFX10_AEncoding)>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121804.415947.patch
Type: text/x-patch
Size: 2787 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220316/943ed6f1/attachment.bin>
More information about the llvm-commits
mailing list