forked from OSchip/llvm-project
[AMDGPU] Factor out predicate FmaakFmamkF32Insts
Differential Revision: https://reviews.llvm.org/D100409
This commit is contained in:
parent
6f3bce911e
commit
13015ebd6f
|
@ -1321,6 +1321,10 @@ def Has64BitDPP : Predicate<"Subtarget->has64BitDPP()">,
|
||||||
def HasPackedFP32Ops : Predicate<"Subtarget->hasPackedFP32Ops()">,
|
def HasPackedFP32Ops : Predicate<"Subtarget->hasPackedFP32Ops()">,
|
||||||
AssemblerPredicate<(all_of FeaturePackedFP32Ops)>;
|
AssemblerPredicate<(all_of FeaturePackedFP32Ops)>;
|
||||||
|
|
||||||
|
def HasFmaakFmamkF32Insts :
|
||||||
|
Predicate<"Subtarget->hasFmaakFmamkF32Insts()">,
|
||||||
|
AssemblerPredicate<(any_of FeatureGFX10Insts)>;
|
||||||
|
|
||||||
def HasExtendedImageInsts : Predicate<"Subtarget->hasExtendedImageInsts()">,
|
def HasExtendedImageInsts : Predicate<"Subtarget->hasExtendedImageInsts()">,
|
||||||
AssemblerPredicate<(all_of FeatureExtendedImageInsts)>;
|
AssemblerPredicate<(all_of FeatureExtendedImageInsts)>;
|
||||||
|
|
||||||
|
|
|
@ -838,6 +838,10 @@ public:
|
||||||
return HasPackedFP32Ops;
|
return HasPackedFP32Ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hasFmaakFmamkF32Insts() const {
|
||||||
|
return getGeneration() >= GFX10;
|
||||||
|
}
|
||||||
|
|
||||||
bool hasExtendedImageInsts() const {
|
bool hasExtendedImageInsts() const {
|
||||||
return HasExtendedImageInsts;
|
return HasExtendedImageInsts;
|
||||||
}
|
}
|
||||||
|
|
|
@ -749,17 +749,21 @@ let AddedComplexity = 30 in {
|
||||||
}
|
}
|
||||||
} // End AddedComplexity = 30
|
} // End AddedComplexity = 30
|
||||||
|
|
||||||
|
let SubtargetPredicate = HasFmaakFmamkF32Insts in {
|
||||||
|
def V_FMAMK_F32 : VOP2_Pseudo<"v_fmamk_f32", VOP_MADMK_F32, [], "">;
|
||||||
|
|
||||||
|
let isCommutable = 1 in
|
||||||
|
def V_FMAAK_F32 : VOP2_Pseudo<"v_fmaak_f32", VOP_MADAK_F32, [], "">;
|
||||||
|
}
|
||||||
|
|
||||||
let SubtargetPredicate = isGFX10Plus in {
|
let SubtargetPredicate = isGFX10Plus in {
|
||||||
|
|
||||||
def V_FMAMK_F32 : VOP2_Pseudo<"v_fmamk_f32", VOP_MADMK_F32, [], "">;
|
let FPDPRounding = 1 in {
|
||||||
let FPDPRounding = 1 in
|
|
||||||
def V_FMAMK_F16 : VOP2_Pseudo <"v_fmamk_f16", VOP_MADMK_F16, [], "">;
|
def V_FMAMK_F16 : VOP2_Pseudo <"v_fmamk_f16", VOP_MADMK_F16, [], "">;
|
||||||
|
|
||||||
let isCommutable = 1 in {
|
let isCommutable = 1 in
|
||||||
def V_FMAAK_F32 : VOP2_Pseudo<"v_fmaak_f32", VOP_MADAK_F32, [], "">;
|
|
||||||
let FPDPRounding = 1 in
|
|
||||||
def V_FMAAK_F16 : VOP2_Pseudo <"v_fmaak_f16", VOP_MADAK_F16, [], "">;
|
def V_FMAAK_F16 : VOP2_Pseudo <"v_fmaak_f16", VOP_MADAK_F16, [], "">;
|
||||||
} // End isCommutable = 1
|
} // End FPDPRounding = 1
|
||||||
|
|
||||||
let Constraints = "$vdst = $src2",
|
let Constraints = "$vdst = $src2",
|
||||||
DisableEncoding="$src2",
|
DisableEncoding="$src2",
|
||||||
|
|
Loading…
Reference in New Issue