@@ -826,7 +826,7 @@ defm : vextract_for_size_lowering<"VEXTRACTF64x4Z", v32bf16_info, v16bf16x_info,
826
826
827
827
// A 128-bit extract from bits [255:128] of a 512-bit vector should use a
828
828
// smaller extract to enable EVEX->VEX.
829
- let Predicates = [NoVLX] in {
829
+ let Predicates = [NoVLX, HasEVEX512 ] in {
830
830
def : Pat<(v2i64 (extract_subvector (v8i64 VR512:$src), (iPTR 2))),
831
831
(v2i64 (VEXTRACTI128rr
832
832
(v4i64 (EXTRACT_SUBREG (v8i64 VR512:$src), sub_ymm)),
@@ -3080,7 +3080,7 @@ def : Pat<(Narrow.KVT (and Narrow.KRC:$mask,
3080
3080
addr:$src2, (X86cmpm_imm_commute timm:$cc)), Narrow.KRC)>;
3081
3081
}
3082
3082
3083
- let Predicates = [HasAVX512, NoVLX] in {
3083
+ let Predicates = [HasAVX512, NoVLX, HasEVEX512 ] in {
3084
3084
defm : axv512_icmp_packed_cc_no_vlx_lowering<X86pcmpm, X86pcmpm_su, "VPCMPD", v8i32x_info, v16i32_info>;
3085
3085
defm : axv512_icmp_packed_cc_no_vlx_lowering<X86pcmpum, X86pcmpum_su, "VPCMPUD", v8i32x_info, v16i32_info>;
3086
3086
@@ -3111,7 +3111,7 @@ let Predicates = [HasAVX512, NoVLX] in {
3111
3111
defm : axv512_cmp_packed_cc_no_vlx_lowering<"VCMPPD", v2f64x_info, v8f64_info>;
3112
3112
}
3113
3113
3114
- let Predicates = [HasBWI, NoVLX] in {
3114
+ let Predicates = [HasBWI, NoVLX, HasEVEX512 ] in {
3115
3115
defm : axv512_icmp_packed_cc_no_vlx_lowering<X86pcmpm, X86pcmpm_su, "VPCMPB", v32i8x_info, v64i8_info>;
3116
3116
defm : axv512_icmp_packed_cc_no_vlx_lowering<X86pcmpum, X86pcmpum_su, "VPCMPUB", v32i8x_info, v64i8_info>;
3117
3117
@@ -3505,7 +3505,7 @@ multiclass mask_move_lowering<string InstrStr, X86VectorVTInfo Narrow,
3505
3505
3506
3506
// Patterns for handling v8i1 selects of 256-bit vectors when VLX isn't
3507
3507
// available. Use a 512-bit operation and extract.
3508
- let Predicates = [HasAVX512, NoVLX] in {
3508
+ let Predicates = [HasAVX512, NoVLX, HasEVEX512 ] in {
3509
3509
defm : mask_move_lowering<"VMOVAPSZ", v4f32x_info, v16f32_info>;
3510
3510
defm : mask_move_lowering<"VMOVDQA32Z", v4i32x_info, v16i32_info>;
3511
3511
defm : mask_move_lowering<"VMOVAPSZ", v8f32x_info, v16f32_info>;
@@ -3517,7 +3517,7 @@ let Predicates = [HasAVX512, NoVLX] in {
3517
3517
defm : mask_move_lowering<"VMOVDQA64Z", v4i64x_info, v8i64_info>;
3518
3518
}
3519
3519
3520
- let Predicates = [HasBWI, NoVLX] in {
3520
+ let Predicates = [HasBWI, NoVLX, HasEVEX512 ] in {
3521
3521
defm : mask_move_lowering<"VMOVDQU8Z", v16i8x_info, v64i8_info>;
3522
3522
defm : mask_move_lowering<"VMOVDQU8Z", v32i8x_info, v64i8_info>;
3523
3523
@@ -5010,8 +5010,8 @@ defm VPMINUD : avx512_binop_rm_vl_d<0x3B, "vpminud", umin,
5010
5010
defm VPMINUQ : avx512_binop_rm_vl_q<0x3B, "vpminuq", umin,
5011
5011
SchedWriteVecALU, HasAVX512, 1>, T8;
5012
5012
5013
- // PMULLQ: Use 512bit version to implement 128/256 bit in case NoVLX.
5014
- let Predicates = [HasDQI, NoVLX] in {
5013
+ // PMULLQ: Use 512bit version to implement 128/256 bit in case NoVLX, HasEVEX512 .
5014
+ let Predicates = [HasDQI, NoVLX, HasEVEX512 ] in {
5015
5015
def : Pat<(v4i64 (mul (v4i64 VR256X:$src1), (v4i64 VR256X:$src2))),
5016
5016
(EXTRACT_SUBREG
5017
5017
(VPMULLQZrr
@@ -5067,7 +5067,7 @@ multiclass avx512_min_max_lowering<string Instr, SDNode OpNode> {
5067
5067
sub_xmm)>;
5068
5068
}
5069
5069
5070
- let Predicates = [HasAVX512, NoVLX] in {
5070
+ let Predicates = [HasAVX512, NoVLX, HasEVEX512 ] in {
5071
5071
defm : avx512_min_max_lowering<"VPMAXUQZ", umax>;
5072
5072
defm : avx512_min_max_lowering<"VPMINUQZ", umin>;
5073
5073
defm : avx512_min_max_lowering<"VPMAXSQZ", smax>;
@@ -6044,7 +6044,7 @@ defm VPSRL : avx512_shift_types<0xD2, 0xD3, 0xD1, "vpsrl", X86vsrl,
6044
6044
SchedWriteVecShift>;
6045
6045
6046
6046
// Use 512bit VPSRA/VPSRAI version to implement v2i64/v4i64 in case NoVLX.
6047
- let Predicates = [HasAVX512, NoVLX] in {
6047
+ let Predicates = [HasAVX512, NoVLX, HasEVEX512 ] in {
6048
6048
def : Pat<(v4i64 (X86vsra (v4i64 VR256X:$src1), (v2i64 VR128X:$src2))),
6049
6049
(EXTRACT_SUBREG (v8i64
6050
6050
(VPSRAQZrr
@@ -6173,14 +6173,14 @@ defm VPSRLV : avx512_var_shift_types<0x45, "vpsrlv", X86vsrlv, SchedWriteVarVecS
6173
6173
defm VPRORV : avx512_var_shift_types<0x14, "vprorv", rotr, SchedWriteVarVecShift>;
6174
6174
defm VPROLV : avx512_var_shift_types<0x15, "vprolv", rotl, SchedWriteVarVecShift>;
6175
6175
6176
- defm : avx512_var_shift_lowering<avx512vl_i64_info, "VPSRAVQ", X86vsrav, [HasAVX512, NoVLX]>;
6177
- defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSLLVW", X86vshlv, [HasBWI, NoVLX]>;
6178
- defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSRAVW", X86vsrav, [HasBWI, NoVLX]>;
6179
- defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSRLVW", X86vsrlv, [HasBWI, NoVLX]>;
6176
+ defm : avx512_var_shift_lowering<avx512vl_i64_info, "VPSRAVQ", X86vsrav, [HasAVX512, NoVLX, HasEVEX512 ]>;
6177
+ defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSLLVW", X86vshlv, [HasBWI, NoVLX, HasEVEX512 ]>;
6178
+ defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSRAVW", X86vsrav, [HasBWI, NoVLX, HasEVEX512 ]>;
6179
+ defm : avx512_var_shift_lowering<avx512vl_i16_info, "VPSRLVW", X86vsrlv, [HasBWI, NoVLX, HasEVEX512 ]>;
6180
6180
6181
6181
6182
6182
// Use 512bit VPROL/VPROLI version to implement v2i64/v4i64 + v4i32/v8i32 in case NoVLX.
6183
- let Predicates = [HasAVX512, NoVLX] in {
6183
+ let Predicates = [HasAVX512, NoVLX, HasEVEX512 ] in {
6184
6184
def : Pat<(v2i64 (rotl (v2i64 VR128X:$src1), (v2i64 VR128X:$src2))),
6185
6185
(EXTRACT_SUBREG (v8i64
6186
6186
(VPROLVQZrr
@@ -6231,7 +6231,7 @@ let Predicates = [HasAVX512, NoVLX] in {
6231
6231
}
6232
6232
6233
6233
// Use 512bit VPROR/VPRORI version to implement v2i64/v4i64 + v4i32/v8i32 in case NoVLX.
6234
- let Predicates = [HasAVX512, NoVLX] in {
6234
+ let Predicates = [HasAVX512, NoVLX, HasEVEX512 ] in {
6235
6235
def : Pat<(v2i64 (rotr (v2i64 VR128X:$src1), (v2i64 VR128X:$src2))),
6236
6236
(EXTRACT_SUBREG (v8i64
6237
6237
(VPRORVQZrr
@@ -9863,7 +9863,7 @@ defm VPMOVUSWB : avx512_trunc_wb<0x10, "vpmovuswb", X86vtruncus,
9863
9863
truncstore_us_vi8, masked_truncstore_us_vi8,
9864
9864
X86vtruncus, X86vmtruncus>;
9865
9865
9866
- let Predicates = [HasAVX512, NoVLX] in {
9866
+ let Predicates = [HasAVX512, NoVLX, HasEVEX512 ] in {
9867
9867
def: Pat<(v8i16 (trunc (v8i32 VR256X:$src))),
9868
9868
(v8i16 (EXTRACT_SUBREG
9869
9869
(v16i16 (VPMOVDWZrr (v16i32 (INSERT_SUBREG (IMPLICIT_DEF),
@@ -9874,7 +9874,7 @@ def: Pat<(v4i32 (trunc (v4i64 VR256X:$src))),
9874
9874
VR256X:$src, sub_ymm)))), sub_xmm))>;
9875
9875
}
9876
9876
9877
- let Predicates = [HasBWI, NoVLX] in {
9877
+ let Predicates = [HasBWI, NoVLX, HasEVEX512 ] in {
9878
9878
def: Pat<(v16i8 (trunc (v16i16 VR256X:$src))),
9879
9879
(v16i8 (EXTRACT_SUBREG (VPMOVWBZrr (v32i16 (INSERT_SUBREG (IMPLICIT_DEF),
9880
9880
VR256X:$src, sub_ymm))), sub_xmm))>;
@@ -10417,7 +10417,7 @@ multiclass avx512_convert_vector_to_mask<bits<8> opc, string OpcodeStr,
10417
10417
defm Z128 : convert_vector_to_mask_common<opc, VTInfo.info128, OpcodeStr>,
10418
10418
EVEX_V128;
10419
10419
}
10420
- let Predicates = [prd, NoVLX] in {
10420
+ let Predicates = [prd, NoVLX, HasEVEX512 ] in {
10421
10421
defm Z256_Alt : convert_vector_to_mask_lowering<VTInfo.info512, VTInfo.info256, NAME>;
10422
10422
defm Z128_Alt : convert_vector_to_mask_lowering<VTInfo.info512, VTInfo.info128, NAME>;
10423
10423
}
@@ -11204,7 +11204,7 @@ defm VPABS : avx512_unary_rm_vl_all<0x1C, 0x1D, 0x1E, 0x1F, "vpabs", abs,
11204
11204
SchedWriteVecALU>;
11205
11205
11206
11206
// VPABS: Use 512bit version to implement 128/256 bit in case NoVLX.
11207
- let Predicates = [HasAVX512, NoVLX] in {
11207
+ let Predicates = [HasAVX512, NoVLX, HasEVEX512 ] in {
11208
11208
def : Pat<(v4i64 (abs VR256X:$src)),
11209
11209
(EXTRACT_SUBREG
11210
11210
(VPABSQZrr
@@ -11220,7 +11220,7 @@ let Predicates = [HasAVX512, NoVLX] in {
11220
11220
// Use 512bit version to implement 128/256 bit.
11221
11221
multiclass avx512_unary_lowering<string InstrStr, SDNode OpNode,
11222
11222
AVX512VLVectorVTInfo _, Predicate prd> {
11223
- let Predicates = [prd, NoVLX] in {
11223
+ let Predicates = [prd, NoVLX, HasEVEX512 ] in {
11224
11224
def : Pat<(_.info256.VT (OpNode (_.info256.VT _.info256.RC:$src1))),
11225
11225
(EXTRACT_SUBREG
11226
11226
(!cast<Instruction>(InstrStr # "Zrr")
@@ -11839,7 +11839,7 @@ let Predicates = [HasAVX512] in {
11839
11839
(VPTERNLOGQZrri VR512:$src, VR512:$src, VR512:$src, (i8 15))>;
11840
11840
}
11841
11841
11842
- let Predicates = [HasAVX512, NoVLX] in {
11842
+ let Predicates = [HasAVX512, NoVLX, HasEVEX512 ] in {
11843
11843
def : Pat<(v16i8 (vnot VR128X:$src)),
11844
11844
(EXTRACT_SUBREG
11845
11845
(VPTERNLOGQZrri
0 commit comments