[llvm] f0899ed - [AMDGPU] Give some of the VI V_PK_* instructions a subtarget predicate. (#70334)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 27 03:14:45 PDT 2023
Author: Ivan Kosarev
Date: 2023-10-27T11:14:40+01:00
New Revision: f0899edecae23742e01d6f3913b62841ad123532
URL: https://github.com/llvm/llvm-project/commit/f0899edecae23742e01d6f3913b62841ad123532
DIFF: https://github.com/llvm/llvm-project/commit/f0899edecae23742e01d6f3913b62841ad123532.diff
LOG: [AMDGPU] Give some of the VI V_PK_* instructions a subtarget predicate. (#70334)
This resolves AsmParser ambiguity between them and similar instructions
for other subtargets, e.g., V_PK_SUB_U16_vi being identical to
V_PK_SUB_U16_gfx11 on GFX11.
Part of <https://github.com/llvm/llvm-project/issues/69256>.
Added:
Modified:
llvm/lib/Target/AMDGPU/VOP3PInstructions.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/VOP3PInstructions.td b/llvm/lib/Target/AMDGPU/VOP3PInstructions.td
index 05e68f46b32605d..9c746cda1a4b108 100644
--- a/llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP3PInstructions.td
@@ -1105,6 +1105,7 @@ multiclass VOP3P_Real_SMFMAC<bits<7> op, string alias> {
def : MnemonicAlias<alias, !cast<VOP3_Pseudo>(NAME#"_e64").Mnemonic>;
}
+let SubtargetPredicate = isGFX8GFX9 in {
defm V_PK_MAD_I16 : VOP3P_Real_vi <0x00>;
defm V_PK_MUL_LO_U16 : VOP3P_Real_vi <0x01>;
defm V_PK_ADD_I16 : VOP3P_Real_vi <0x02>;
@@ -1125,7 +1126,7 @@ defm V_PK_ADD_F16 : VOP3P_Real_vi <0x0f>;
defm V_PK_MUL_F16 : VOP3P_Real_vi <0x10>;
defm V_PK_MIN_F16 : VOP3P_Real_vi <0x11>;
defm V_PK_MAX_F16 : VOP3P_Real_vi <0x12>;
-
+} // End SubtargetPredicate = isGFX8GFX9
let SubtargetPredicate = HasMadMixInsts in {
defm V_MAD_MIX_F32 : VOP3P_Real_vi <0x20>;
More information about the llvm-commits
mailing list