@@ -1987,6 +1987,26 @@ defm SVREVD : SInstZPZ<"svrevd", "csilUcUsUiUl", "aarch64_sve_revd">;
1987
1987
// SME intrinsics which operate only on vectors and do not require ZA should be added here,
1988
1988
// as they could possibly become SVE instructions in the future.
1989
1989
1990
+ multiclass MinMaxIntr<string i, string zm, string mul, string t> {
1991
+ def SVS # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "csil", MergeNone, "aarch64_sve_s" # i # zm # "_" # mul, [IsStreaming], []>;
1992
+ def SVU # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "UcUsUiUl", MergeNone, "aarch64_sve_u" # i # zm # "_" # mul, [IsStreaming], []>;
1993
+ def SVF # NAME : SInst<"sv" # i # "[" # zm # "_{d}_" # mul # "]", t, "hfd", MergeNone, "aarch64_sve_f" # i # zm # "_" # mul, [IsStreaming], []>;
1994
+ }
1995
+
1996
+ let TargetGuard = "sme2" in {
1997
+ // == SMAX / UMAX / FMAX ==
1998
+ defm MAX_SINGLE_X2 : MinMaxIntr<"max", "_single", "x2", "22d">;
1999
+ defm MAX_MULTI_X2 : MinMaxIntr<"max", "", "x2", "222">;
2000
+ defm MAX_SINGLE_X4 : MinMaxIntr<"max", "_single", "x4", "44d">;
2001
+ defm MAX_MULTI_X4 : MinMaxIntr<"max", "", "x4", "444">;
2002
+
2003
+ // == SMIN / UMIN / FMIN ==
2004
+ defm MIN_SINGLE_X2 : MinMaxIntr<"min", "_single", "x2", "22d">;
2005
+ defm MIN_MULTI_X2 : MinMaxIntr<"min", "", "x2", "222">;
2006
+ defm MIN_SINGLE_X4 : MinMaxIntr<"min", "_single", "x4", "44d">;
2007
+ defm MIN_MULTI_X4 : MinMaxIntr<"min", "", "x4", "444">;
2008
+ }
2009
+
1990
2010
let TargetGuard = "sme2" in {
1991
2011
// == ADD (vectors) ==
1992
2012
def SVADD_SINGLE_X2 : SInst<"svadd[_single_{d}_x2]", "22d", "cUcsUsiUilUl", MergeNone, "aarch64_sve_add_single_x2", [IsStreaming], []>;
0 commit comments