================
@@ -1738,6 +1722,31 @@ multiclass FMA_INST {
defm INT_NVVM_FMA : FMA_INST;
+class FMA_OOB_INST<NVPTXRegClass RC, string suffix> :
+ BasicNVPTXInst<(outs RC:$dst), (ins RC:$a, RC:$b, RC:$c),
+ "fma.rn.oob" # suffix>;
+
+class FMA_OOB_TYPE<ValueType VT, NVPTXRegClass RC, string TypeName> {
+ ValueType Type = VT;
+ NVPTXRegClass RegClass = RC;
+ string TypeStr = TypeName;
+}
+
+let Predicates = [hasPTX<81>, hasSM<90>] in {
+ foreach relu = ["", "_relu"] in {
+ foreach ty = [
+ FMA_OOB_TYPE<f16, B16, "f16">,
+ FMA_OOB_TYPE<v2f16, B32, "f16x2">,
+ FMA_OOB_TYPE<bf16, B16, "bf16">,
+ FMA_OOB_TYPE<v2bf16, B32, "bf16x2">
+ ] in {
+ defvar Intr = !cast<Intrinsic>("int_nvvm_fma_rn_oob" # relu);
+ defvar suffix = !subst("_", ".", relu # "_" # ty.TypeStr);
+ def : Pat<(ty.Type (Intr ty.Type:$a, ty.Type:$b, ty.Type:$c)),
+ (FMA_OOB_INST<ty.RegClass, suffix> $a, $b, $c)>;
----------------
AlexMaclean wrote:
We should define this Instruction and give it a proper name.
https://github.com/llvm/llvm-project/pull/170079
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits