@@ -289,7 +289,7 @@ def SPLATQ : WInst<"splat_laneq", ".(!Q)I",
289
289
"UcUsUicsilPcPsfQUcQUsQUiQcQsQiQPcQPsQflUlQlQUlhdQhQdPlQPl"> {
290
290
let isLaneQ = 1;
291
291
}
292
- let ArchGuard = "defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC) " in {
292
+ let TargetGuard = "bf16 " in {
293
293
def SPLAT_BF : WInst<"splat_lane", ".(!q)I", "bQb">;
294
294
def SPLATQ_BF : WInst<"splat_laneq", ".(!Q)I", "bQb"> {
295
295
let isLaneQ = 1;
@@ -1120,14 +1120,14 @@ def VEXT_A64 : WInst<"vext", "...I", "dQdPlQPl">;
1120
1120
1121
1121
////////////////////////////////////////////////////////////////////////////////
1122
1122
// Crypto
1123
- let ArchGuard = "__ARM_ARCH >= 8 && defined(__ARM_FEATURE_AES) " in {
1123
+ let ArchGuard = "__ARM_ARCH >= 8", TargetGuard = "aes " in {
1124
1124
def AESE : SInst<"vaese", "...", "QUc">;
1125
1125
def AESD : SInst<"vaesd", "...", "QUc">;
1126
1126
def AESMC : SInst<"vaesmc", "..", "QUc">;
1127
1127
def AESIMC : SInst<"vaesimc", "..", "QUc">;
1128
1128
}
1129
1129
1130
- let ArchGuard = "__ARM_ARCH >= 8 && defined(__ARM_FEATURE_SHA2) " in {
1130
+ let ArchGuard = "__ARM_ARCH >= 8", TargetGuard = "sha2 " in {
1131
1131
def SHA1H : SInst<"vsha1h", "11", "Ui">;
1132
1132
def SHA1SU1 : SInst<"vsha1su1", "...", "QUi">;
1133
1133
def SHA256SU0 : SInst<"vsha256su0", "...", "QUi">;
@@ -1141,7 +1141,7 @@ def SHA256H2 : SInst<"vsha256h2", "....", "QUi">;
1141
1141
def SHA256SU1 : SInst<"vsha256su1", "....", "QUi">;
1142
1142
}
1143
1143
1144
- let ArchGuard = "defined(__ARM_FEATURE_SHA3) && defined(__aarch64__) " in {
1144
+ let ArchGuard = "defined(__aarch64__)", TargetGuard = "sha3 " in {
1145
1145
def BCAX : SInst<"vbcax", "....", "QUcQUsQUiQUlQcQsQiQl">;
1146
1146
def EOR3 : SInst<"veor3", "....", "QUcQUsQUiQUlQcQsQiQl">;
1147
1147
def RAX1 : SInst<"vrax1", "...", "QUl">;
@@ -1151,15 +1151,14 @@ def XAR : SInst<"vxar", "...I", "QUl">;
1151
1151
}
1152
1152
}
1153
1153
1154
- let ArchGuard = "defined(__ARM_FEATURE_SHA512) && defined(__aarch64__)" in {
1155
-
1154
+ let ArchGuard = "defined(__aarch64__)", TargetGuard = "sha3" in {
1156
1155
def SHA512SU0 : SInst<"vsha512su0", "...", "QUl">;
1157
1156
def SHA512su1 : SInst<"vsha512su1", "....", "QUl">;
1158
1157
def SHA512H : SInst<"vsha512h", "....", "QUl">;
1159
1158
def SHA512H2 : SInst<"vsha512h2", "....", "QUl">;
1160
1159
}
1161
1160
1162
- let ArchGuard = "defined(__ARM_FEATURE_SM3) && defined(__aarch64__) " in {
1161
+ let ArchGuard = "defined(__aarch64__)", TargetGuard = "sm4 " in {
1163
1162
def SM3SS1 : SInst<"vsm3ss1", "....", "QUi">;
1164
1163
def SM3TT1A : SInst<"vsm3tt1a", "....I", "QUi">;
1165
1164
def SM3TT1B : SInst<"vsm3tt1b", "....I", "QUi">;
@@ -1169,7 +1168,7 @@ def SM3PARTW1 : SInst<"vsm3partw1", "....", "QUi">;
1169
1168
def SM3PARTW2 : SInst<"vsm3partw2", "....", "QUi">;
1170
1169
}
1171
1170
1172
- let ArchGuard = "defined(__ARM_FEATURE_SM4) && defined(__aarch64__) " in {
1171
+ let ArchGuard = "defined(__aarch64__)", TargetGuard = "sm4 " in {
1173
1172
def SM4E : SInst<"vsm4e", "...", "QUi">;
1174
1173
def SM4EKEY : SInst<"vsm4ekey", "...", "QUi">;
1175
1174
}
@@ -1648,7 +1647,7 @@ def SCALAR_VDUP_LANEQ : IInst<"vdup_laneq", "1QI", "ScSsSiSlSfSdSUcSUsSUiSUlSPcS
1648
1647
} // ArchGuard = "defined(__aarch64__)"
1649
1648
1650
1649
// ARMv8.2-A FP16 vector intrinsics for A32/A64.
1651
- let ArchGuard = "defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) " in {
1650
+ let TargetGuard = "fullfp16 " in {
1652
1651
1653
1652
// ARMv8.2-A FP16 one-operand vector intrinsics.
1654
1653
@@ -1673,7 +1672,7 @@ let ArchGuard = "defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)" in {
1673
1672
def VCVTP_U16 : SInst<"vcvtp_u16", "U.", "hQh">;
1674
1673
1675
1674
// Vector rounding
1676
- let ArchGuard = "__ARM_ARCH >= 8 && defined(__ARM_FEATURE_DIRECTED_ROUNDING) && defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) " in {
1675
+ let ArchGuard = "__ARM_ARCH >= 8 && defined(__ARM_FEATURE_DIRECTED_ROUNDING)", TargetGuard = "fullfp16 " in {
1677
1676
def FRINTZH : SInst<"vrnd", "..", "hQh">;
1678
1677
def FRINTNH : SInst<"vrndn", "..", "hQh">;
1679
1678
def FRINTAH : SInst<"vrnda", "..", "hQh">;
@@ -1722,7 +1721,7 @@ let ArchGuard = "defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)" in {
1722
1721
// Max/Min
1723
1722
def VMAXH : SInst<"vmax", "...", "hQh">;
1724
1723
def VMINH : SInst<"vmin", "...", "hQh">;
1725
- let ArchGuard = "__ARM_ARCH >= 8 && defined(__ARM_FEATURE_NUMERIC_MAXMIN) && defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) " in {
1724
+ let ArchGuard = "__ARM_ARCH >= 8 && defined(__ARM_FEATURE_NUMERIC_MAXMIN)", TargetGuard = "fullfp16 " in {
1726
1725
def FMAXNMH : SInst<"vmaxnm", "...", "hQh">;
1727
1726
def FMINNMH : SInst<"vminnm", "...", "hQh">;
1728
1727
}
@@ -1772,7 +1771,7 @@ let ArchGuard = "defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)" in {
1772
1771
}
1773
1772
1774
1773
// ARMv8.2-A FP16 vector intrinsics for A64 only.
1775
- let ArchGuard = "defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && defined(__aarch64__) " in {
1774
+ let ArchGuard = "defined(__aarch64__)", TargetGuard = "fullfp16 " in {
1776
1775
1777
1776
// Vector rounding
1778
1777
def FRINTIH : SInst<"vrndi", "..", "hQh">;
@@ -1867,19 +1866,19 @@ let ArchGuard = "defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && defined(__aarc
1867
1866
}
1868
1867
1869
1868
// v8.2-A dot product instructions.
1870
- let ArchGuard = "defined(__ARM_FEATURE_DOTPROD) " in {
1869
+ let TargetGuard = "dotprod " in {
1871
1870
def DOT : SInst<"vdot", "..(<<)(<<)", "iQiUiQUi">;
1872
1871
def DOT_LANE : SOpInst<"vdot_lane", "..(<<)(<<q)I", "iUiQiQUi", OP_DOT_LN>;
1873
1872
}
1874
- let ArchGuard = "defined(__ARM_FEATURE_DOTPROD) && defined(__aarch64__) " in {
1873
+ let ArchGuard = "defined(__aarch64__)", TargetGuard = "dotprod " in {
1875
1874
// Variants indexing into a 128-bit vector are A64 only.
1876
1875
def UDOT_LANEQ : SOpInst<"vdot_laneq", "..(<<)(<<Q)I", "iUiQiQUi", OP_DOT_LNQ> {
1877
1876
let isLaneQ = 1;
1878
1877
}
1879
1878
}
1880
1879
1881
1880
// v8.2-A FP16 fused multiply-add long instructions.
1882
- let ArchGuard = "defined(__ARM_FEATURE_FP16_FML) && defined(__aarch64__) " in {
1881
+ let ArchGuard = "defined(__aarch64__)", TargetGuard = "fp16fml " in {
1883
1882
def VFMLAL_LOW : SInst<"vfmlal_low", ">>..", "hQh">;
1884
1883
def VFMLSL_LOW : SInst<"vfmlsl_low", ">>..", "hQh">;
1885
1884
def VFMLAL_HIGH : SInst<"vfmlal_high", ">>..", "hQh">;
@@ -1904,7 +1903,7 @@ let ArchGuard = "defined(__ARM_FEATURE_FP16_FML) && defined(__aarch64__)" in {
1904
1903
}
1905
1904
}
1906
1905
1907
- let ArchGuard = "defined(__ARM_FEATURE_MATMUL_INT8) " in {
1906
+ let TargetGuard = "i8mm " in {
1908
1907
def VMMLA : SInst<"vmmla", "..(<<)(<<)", "QUiQi">;
1909
1908
def VUSMMLA : SInst<"vusmmla", "..(<<U)(<<)", "Qi">;
1910
1909
@@ -1921,7 +1920,7 @@ let ArchGuard = "defined(__ARM_FEATURE_MATMUL_INT8)" in {
1921
1920
}
1922
1921
}
1923
1922
1924
- let ArchGuard = "defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC) " in {
1923
+ let TargetGuard = "bf16 " in {
1925
1924
def VDOT_BF : SInst<"vbfdot", "..BB", "fQf">;
1926
1925
def VDOT_LANE_BF : SOpInst<"vbfdot_lane", "..B(Bq)I", "fQf", OP_BFDOT_LN>;
1927
1926
def VDOT_LANEQ_BF : SOpInst<"vbfdot_laneq", "..B(BQ)I", "fQf", OP_BFDOT_LNQ> {
@@ -1965,7 +1964,7 @@ multiclass VCMLA_ROTS<string type, string lanety, string laneqty> {
1965
1964
}
1966
1965
1967
1966
// v8.3-A Vector complex addition intrinsics
1968
- let ArchGuard = "defined(__ARM_FEATURE_COMPLEX) && defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) " in {
1967
+ let ArchGuard = "defined(__ARM_FEATURE_COMPLEX)", TargetGuard = "fullfp16 " in {
1969
1968
def VCADD_ROT90_FP16 : SInst<"vcadd_rot90", "...", "h">;
1970
1969
def VCADD_ROT270_FP16 : SInst<"vcadd_rot270", "...", "h">;
1971
1970
def VCADDQ_ROT90_FP16 : SInst<"vcaddq_rot90", "QQQ", "h">;
@@ -1989,7 +1988,7 @@ let ArchGuard = "defined(__ARM_FEATURE_COMPLEX) && defined(__aarch64__)" in {
1989
1988
}
1990
1989
1991
1990
// V8.2-A BFloat intrinsics
1992
- let ArchGuard = "defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC) " in {
1991
+ let TargetGuard = "bf16 " in {
1993
1992
def VCREATE_BF : NoTestOpInst<"vcreate", ".(IU>)", "b", OP_CAST> {
1994
1993
let BigEndianSafe = 1;
1995
1994
}
@@ -2053,14 +2052,14 @@ let ArchGuard = "defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC)" in {
2053
2052
def SCALAR_CVT_F32_BF16 : SOpInst<"vcvtah_f32", "(1F>)(1!)", "b", OP_CVT_F32_BF16>;
2054
2053
}
2055
2054
2056
- let ArchGuard = "defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC) && !defined(__aarch64__)" in {
2055
+ let ArchGuard = "!defined(__aarch64__)", TargetGuard = "bf16 " in {
2057
2056
def VCVT_BF16_F32_A32_INTERNAL : WInst<"__a32_vcvt_bf16", "BQ", "f">;
2058
2057
def VCVT_BF16_F32_A32 : SOpInst<"vcvt_bf16", "BQ", "f", OP_VCVT_BF16_F32_A32>;
2059
2058
def VCVT_LOW_BF16_F32_A32 : SOpInst<"vcvt_low_bf16", "BQ", "Qf", OP_VCVT_BF16_F32_LO_A32>;
2060
2059
def VCVT_HIGH_BF16_F32_A32 : SOpInst<"vcvt_high_bf16", "BBQ", "Qf", OP_VCVT_BF16_F32_HI_A32>;
2061
2060
}
2062
2061
2063
- let ArchGuard = "defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC) && defined(__aarch64__) " in {
2062
+ let ArchGuard = "defined(__aarch64__)", TargetGuard = "bf16 " in {
2064
2063
def VCVT_LOW_BF16_F32_A64_INTERNAL : WInst<"__a64_vcvtq_low_bf16", "BQ", "Hf">;
2065
2064
def VCVT_LOW_BF16_F32_A64 : SOpInst<"vcvt_low_bf16", "BQ", "Qf", OP_VCVT_BF16_F32_LO_A64>;
2066
2065
def VCVT_HIGH_BF16_F32_A64 : SInst<"vcvt_high_bf16", "BBQ", "Qf">;
@@ -2072,14 +2071,14 @@ let ArchGuard = "defined(__ARM_FEATURE_BF16_VECTOR_ARITHMETIC) && defined(__aarc
2072
2071
def COPYQ_LANEQ_BF16 : IOpInst<"vcopy_laneq", "..I.I", "Qb", OP_COPY_LN>;
2073
2072
}
2074
2073
2075
- let ArchGuard = "defined(__ARM_FEATURE_BF16) && !defined(__aarch64__)" in {
2074
+ let ArchGuard = "!defined(__aarch64__)", TargetGuard = "bf16 " in {
2076
2075
let BigEndianSafe = 1 in {
2077
2076
defm VREINTERPRET_BF : REINTERPRET_CROSS_TYPES<
2078
2077
"csilUcUsUiUlhfPcPsPlQcQsQiQlQUcQUsQUiQUlQhQfQPcQPsQPl", "bQb">;
2079
2078
}
2080
2079
}
2081
2080
2082
- let ArchGuard = "defined(__ARM_FEATURE_BF16) && defined(__aarch64__) " in {
2081
+ let ArchGuard = "defined(__aarch64__)", TargetGuard = "bf16 " in {
2083
2082
let BigEndianSafe = 1 in {
2084
2083
defm VVREINTERPRET_BF : REINTERPRET_CROSS_TYPES<
2085
2084
"csilUcUsUiUlhfdPcPsPlQcQsQiQlQUcQUsQUiQUlQhQfQdQPcQPsQPlQPk", "bQb">;
0 commit comments