@@ -3297,15 +3297,15 @@ let Predicates = [HasBWI, NoVLX] in {
3297
3297
}
3298
3298
3299
3299
// Mask setting all 0s or 1s
3300
- multiclass avx512_mask_setop<RegisterClass KRC, ValueType VT, PatFrag Val> {
3300
+ multiclass avx512_mask_setop<RegisterClass KRC, ValueType VT, SDPatternOperator Val> {
3301
3301
let Predicates = [HasAVX512] in
3302
3302
let isReMaterializable = 1, isAsCheapAsAMove = 1, isPseudo = 1,
3303
3303
SchedRW = [WriteZero] in
3304
3304
def NAME# : I<0, Pseudo, (outs KRC:$dst), (ins), "",
3305
3305
[(set KRC:$dst, (VT Val))]>;
3306
3306
}
3307
3307
3308
- multiclass avx512_mask_setop_w<PatFrag Val> {
3308
+ multiclass avx512_mask_setop_w<SDPatternOperator Val> {
3309
3309
defm W : avx512_mask_setop<VK16, v16i1, Val>;
3310
3310
defm D : avx512_mask_setop<VK32, v32i1, Val>;
3311
3311
defm Q : avx512_mask_setop<VK64, v64i1, Val>;
@@ -5300,7 +5300,7 @@ defm : avx512_logical_lowering_types<"VPANDN", X86andnp>;
5300
5300
//===----------------------------------------------------------------------===//
5301
5301
5302
5302
multiclass avx512_fp_scalar<bits<8> opc, string OpcodeStr,X86VectorVTInfo _,
5303
- SDNode OpNode, SDNode VecNode,
5303
+ SDPatternOperator OpNode, SDNode VecNode,
5304
5304
X86FoldableSchedWrite sched, bit IsCommutable> {
5305
5305
let ExeDomain = _.ExeDomain, Uses = [MXCSR], mayRaiseFPException = 1 in {
5306
5306
defm rr_Int : AVX512_maskable_scalar<opc, MRMSrcReg, _, (outs _.RC:$dst),
@@ -5390,7 +5390,7 @@ multiclass avx512_fp_scalar_sae<bits<8> opc, string OpcodeStr,X86VectorVTInfo _,
5390
5390
}
5391
5391
}
5392
5392
5393
- multiclass avx512_binop_s_round<bits<8> opc, string OpcodeStr, SDNode OpNode,
5393
+ multiclass avx512_binop_s_round<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
5394
5394
SDNode VecNode, SDNode RndNode,
5395
5395
X86SchedWriteSizes sched, bit IsCommutable> {
5396
5396
defm SSZ : avx512_fp_scalar<opc, OpcodeStr#"ss", f32x_info, OpNode, VecNode,
@@ -6429,7 +6429,7 @@ let Predicates = [HasAVX512] in {
6429
6429
// FMA - Fused Multiply Operations
6430
6430
//
6431
6431
6432
- multiclass avx512_fma3p_213_rm<bits<8> opc, string OpcodeStr, SDNode OpNode,
6432
+ multiclass avx512_fma3p_213_rm<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
6433
6433
SDNode MaskOpNode, X86FoldableSchedWrite sched,
6434
6434
X86VectorVTInfo _, string Suff> {
6435
6435
let Constraints = "$src1 = $dst", ExeDomain = _.ExeDomain, hasSideEffects = 0,
@@ -6473,7 +6473,7 @@ multiclass avx512_fma3_213_round<bits<8> opc, string OpcodeStr, SDNode OpNode,
6473
6473
AVX512FMA3Base, EVEX_B, EVEX_RC, Sched<[sched]>;
6474
6474
}
6475
6475
6476
- multiclass avx512_fma3p_213_common<bits<8> opc, string OpcodeStr, SDNode OpNode,
6476
+ multiclass avx512_fma3p_213_common<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
6477
6477
SDNode MaskOpNode, SDNode OpNodeRnd,
6478
6478
X86SchedWriteWidths sched,
6479
6479
AVX512VLVectorVTInfo _, string Suff> {
@@ -6494,7 +6494,7 @@ multiclass avx512_fma3p_213_common<bits<8> opc, string OpcodeStr, SDNode OpNode,
6494
6494
}
6495
6495
}
6496
6496
6497
- multiclass avx512_fma3p_213_f<bits<8> opc, string OpcodeStr, SDNode OpNode,
6497
+ multiclass avx512_fma3p_213_f<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
6498
6498
SDNode MaskOpNode, SDNode OpNodeRnd> {
6499
6499
defm PS : avx512_fma3p_213_common<opc, OpcodeStr#"ps", OpNode, MaskOpNode,
6500
6500
OpNodeRnd, SchedWriteFMA,
@@ -6518,7 +6518,7 @@ defm VFNMSUB213 : avx512_fma3p_213_f<0xAE, "vfnmsub213", X86any_Fnmsub,
6518
6518
X86Fnmsub, X86FnmsubRnd>;
6519
6519
6520
6520
6521
- multiclass avx512_fma3p_231_rm<bits<8> opc, string OpcodeStr, SDNode OpNode,
6521
+ multiclass avx512_fma3p_231_rm<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
6522
6522
SDNode MaskOpNode, X86FoldableSchedWrite sched,
6523
6523
X86VectorVTInfo _, string Suff> {
6524
6524
let Constraints = "$src1 = $dst", ExeDomain = _.ExeDomain, hasSideEffects = 0,
@@ -6564,7 +6564,7 @@ multiclass avx512_fma3_231_round<bits<8> opc, string OpcodeStr, SDNode OpNode,
6564
6564
1, 1>, AVX512FMA3Base, EVEX_B, EVEX_RC, Sched<[sched]>;
6565
6565
}
6566
6566
6567
- multiclass avx512_fma3p_231_common<bits<8> opc, string OpcodeStr, SDNode OpNode,
6567
+ multiclass avx512_fma3p_231_common<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
6568
6568
SDNode MaskOpNode, SDNode OpNodeRnd,
6569
6569
X86SchedWriteWidths sched,
6570
6570
AVX512VLVectorVTInfo _, string Suff> {
@@ -6585,7 +6585,7 @@ multiclass avx512_fma3p_231_common<bits<8> opc, string OpcodeStr, SDNode OpNode,
6585
6585
}
6586
6586
}
6587
6587
6588
- multiclass avx512_fma3p_231_f<bits<8> opc, string OpcodeStr, SDNode OpNode,
6588
+ multiclass avx512_fma3p_231_f<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
6589
6589
SDNode MaskOpNode, SDNode OpNodeRnd > {
6590
6590
defm PS : avx512_fma3p_231_common<opc, OpcodeStr#"ps", OpNode, MaskOpNode,
6591
6591
OpNodeRnd, SchedWriteFMA,
@@ -6608,7 +6608,7 @@ defm VFNMADD231 : avx512_fma3p_231_f<0xBC, "vfnmadd231", X86any_Fnmadd,
6608
6608
defm VFNMSUB231 : avx512_fma3p_231_f<0xBE, "vfnmsub231", X86any_Fnmsub,
6609
6609
X86Fnmsub, X86FnmsubRnd>;
6610
6610
6611
- multiclass avx512_fma3p_132_rm<bits<8> opc, string OpcodeStr, SDNode OpNode,
6611
+ multiclass avx512_fma3p_132_rm<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
6612
6612
SDNode MaskOpNode, X86FoldableSchedWrite sched,
6613
6613
X86VectorVTInfo _, string Suff> {
6614
6614
let Constraints = "$src1 = $dst", ExeDomain = _.ExeDomain, hasSideEffects = 0,
@@ -6656,7 +6656,7 @@ multiclass avx512_fma3_132_round<bits<8> opc, string OpcodeStr, SDNode OpNode,
6656
6656
1, 1>, AVX512FMA3Base, EVEX_B, EVEX_RC, Sched<[sched]>;
6657
6657
}
6658
6658
6659
- multiclass avx512_fma3p_132_common<bits<8> opc, string OpcodeStr, SDNode OpNode,
6659
+ multiclass avx512_fma3p_132_common<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
6660
6660
SDNode MaskOpNode, SDNode OpNodeRnd,
6661
6661
X86SchedWriteWidths sched,
6662
6662
AVX512VLVectorVTInfo _, string Suff> {
@@ -6677,7 +6677,7 @@ multiclass avx512_fma3p_132_common<bits<8> opc, string OpcodeStr, SDNode OpNode,
6677
6677
}
6678
6678
}
6679
6679
6680
- multiclass avx512_fma3p_132_f<bits<8> opc, string OpcodeStr, SDNode OpNode,
6680
+ multiclass avx512_fma3p_132_f<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
6681
6681
SDNode MaskOpNode, SDNode OpNodeRnd > {
6682
6682
defm PS : avx512_fma3p_132_common<opc, OpcodeStr#"ps", OpNode, MaskOpNode,
6683
6683
OpNodeRnd, SchedWriteFMA,
@@ -6745,7 +6745,7 @@ let Constraints = "$src1 = $dst", hasSideEffects = 0 in {
6745
6745
}
6746
6746
6747
6747
multiclass avx512_fma3s_all<bits<8> opc213, bits<8> opc231, bits<8> opc132,
6748
- string OpcodeStr, SDNode OpNode, SDNode OpNodeRnd,
6748
+ string OpcodeStr, SDPatternOperator OpNode, SDNode OpNodeRnd,
6749
6749
X86VectorVTInfo _, string SUFF> {
6750
6750
let ExeDomain = _.ExeDomain in {
6751
6751
defm NAME#213#SUFF#Z: avx512_fma3s_common<opc213, OpcodeStr#"213"#_.Suffix, _,
@@ -6779,7 +6779,7 @@ multiclass avx512_fma3s_all<bits<8> opc213, bits<8> opc231, bits<8> opc132,
6779
6779
}
6780
6780
6781
6781
multiclass avx512_fma3s<bits<8> opc213, bits<8> opc231, bits<8> opc132,
6782
- string OpcodeStr, SDNode OpNode, SDNode OpNodeRnd> {
6782
+ string OpcodeStr, SDPatternOperator OpNode, SDNode OpNodeRnd> {
6783
6783
let Predicates = [HasAVX512] in {
6784
6784
defm NAME : avx512_fma3s_all<opc213, opc231, opc132, OpcodeStr, OpNode,
6785
6785
OpNodeRnd, f32x_info, "SS">,
@@ -6795,7 +6795,7 @@ defm VFMSUB : avx512_fma3s<0xAB, 0xBB, 0x9B, "vfmsub", X86any_Fmsub, X86FmsubRn
6795
6795
defm VFNMADD : avx512_fma3s<0xAD, 0xBD, 0x9D, "vfnmadd", X86any_Fnmadd, X86FnmaddRnd>;
6796
6796
defm VFNMSUB : avx512_fma3s<0xAF, 0xBF, 0x9F, "vfnmsub", X86any_Fnmsub, X86FnmsubRnd>;
6797
6797
6798
- multiclass avx512_scalar_fma_patterns<SDNode Op, SDNode MaskedOp,
6798
+ multiclass avx512_scalar_fma_patterns<SDPatternOperator Op, SDNode MaskedOp,
6799
6799
SDNode RndOp, string Prefix,
6800
6800
string Suffix, SDNode Move,
6801
6801
X86VectorVTInfo _, PatLeaf ZeroFP> {
@@ -7408,7 +7408,7 @@ def : Pat<(v2f64 (X86Movsd
7408
7408
7409
7409
// Convert float/double to signed/unsigned int 32/64 with truncation
7410
7410
multiclass avx512_cvt_s_all<bits<8> opc, string asm, X86VectorVTInfo _SrcRC,
7411
- X86VectorVTInfo _DstRC, SDNode OpNode,
7411
+ X86VectorVTInfo _DstRC, SDPatternOperator OpNode,
7412
7412
SDNode OpNodeInt, SDNode OpNodeSAE,
7413
7413
X86FoldableSchedWrite sched, string aliasStr>{
7414
7414
let Predicates = [HasAVX512], ExeDomain = _SrcRC.ExeDomain in {
@@ -7595,7 +7595,7 @@ def : Pat<(v2f64 (X86Movsd
7595
7595
//===----------------------------------------------------------------------===//
7596
7596
7597
7597
multiclass avx512_vcvt_fp<bits<8> opc, string OpcodeStr, X86VectorVTInfo _,
7598
- X86VectorVTInfo _Src, SDNode OpNode, SDNode MaskOpNode,
7598
+ X86VectorVTInfo _Src, SDPatternOperator OpNode, SDPatternOperator MaskOpNode,
7599
7599
X86FoldableSchedWrite sched,
7600
7600
string Broadcast = _.BroadcastStr,
7601
7601
string Alias = "", X86MemOperand MemOp = _Src.MemOp,
@@ -7665,7 +7665,7 @@ multiclass avx512_vcvt_fp_sae<bits<8> opc, string OpcodeStr, X86VectorVTInfo _,
7665
7665
7666
7666
// Conversion with rounding control (RC)
7667
7667
multiclass avx512_vcvt_fp_rc<bits<8> opc, string OpcodeStr, X86VectorVTInfo _,
7668
- X86VectorVTInfo _Src, SDNode OpNodeRnd,
7668
+ X86VectorVTInfo _Src, SDPatternOperator OpNodeRnd,
7669
7669
X86FoldableSchedWrite sched> {
7670
7670
let Uses = [MXCSR] in
7671
7671
defm rrb : AVX512_maskable<opc, MRMSrcReg, _, (outs _.RC:$dst),
@@ -7677,8 +7677,8 @@ multiclass avx512_vcvt_fp_rc<bits<8> opc, string OpcodeStr, X86VectorVTInfo _,
7677
7677
7678
7678
// Similar to avx512_vcvt_fp, but uses an extload for the memory form.
7679
7679
multiclass avx512_vcvt_fpextend<bits<8> opc, string OpcodeStr, X86VectorVTInfo _,
7680
- X86VectorVTInfo _Src, SDNode OpNode,
7681
- SDNode MaskOpNode,
7680
+ X86VectorVTInfo _Src, SDPatternOperator OpNode,
7681
+ SDNode MaskOpNode,
7682
7682
X86FoldableSchedWrite sched,
7683
7683
string Broadcast = _.BroadcastStr,
7684
7684
string Alias = "", X86MemOperand MemOp = _Src.MemOp,
@@ -7802,8 +7802,8 @@ let Predicates = [HasVLX] in {
7802
7802
7803
7803
// Convert Signed/Unsigned Doubleword to Double
7804
7804
let Uses = []<Register>, mayRaiseFPException = 0 in
7805
- multiclass avx512_cvtdq2pd<bits<8> opc, string OpcodeStr, SDNode OpNode,
7806
- SDNode MaskOpNode, SDNode OpNode128,
7805
+ multiclass avx512_cvtdq2pd<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
7806
+ SDNode MaskOpNode, SDPatternOperator OpNode128,
7807
7807
SDNode MaskOpNode128,
7808
7808
X86SchedWriteWidths sched> {
7809
7809
// No rounding in this op
@@ -7828,7 +7828,7 @@ multiclass avx512_cvtdq2pd<bits<8> opc, string OpcodeStr, SDNode OpNode,
7828
7828
}
7829
7829
7830
7830
// Convert Signed/Unsigned Doubleword to Float
7831
- multiclass avx512_cvtdq2ps<bits<8> opc, string OpcodeStr, SDNode OpNode,
7831
+ multiclass avx512_cvtdq2ps<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
7832
7832
SDNode MaskOpNode, SDNode OpNodeRnd,
7833
7833
X86SchedWriteWidths sched> {
7834
7834
let Predicates = [HasAVX512] in
@@ -7846,7 +7846,7 @@ multiclass avx512_cvtdq2ps<bits<8> opc, string OpcodeStr, SDNode OpNode,
7846
7846
}
7847
7847
7848
7848
// Convert Float to Signed/Unsigned Doubleword with truncation
7849
- multiclass avx512_cvttps2dq<bits<8> opc, string OpcodeStr, SDNode OpNode,
7849
+ multiclass avx512_cvttps2dq<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
7850
7850
SDNode MaskOpNode,
7851
7851
SDNode OpNodeSAE, X86SchedWriteWidths sched> {
7852
7852
let Predicates = [HasAVX512] in {
@@ -7882,7 +7882,7 @@ multiclass avx512_cvtps2dq<bits<8> opc, string OpcodeStr, SDNode OpNode,
7882
7882
}
7883
7883
7884
7884
// Convert Double to Signed/Unsigned Doubleword with truncation
7885
- multiclass avx512_cvttpd2dq<bits<8> opc, string OpcodeStr, SDNode OpNode,
7885
+ multiclass avx512_cvttpd2dq<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
7886
7886
SDNode MaskOpNode, SDNode OpNodeSAE,
7887
7887
X86SchedWriteWidths sched> {
7888
7888
let Predicates = [HasAVX512] in {
@@ -8028,7 +8028,7 @@ multiclass avx512_cvtpd2qq<bits<8> opc, string OpcodeStr, SDNode OpNode,
8028
8028
}
8029
8029
8030
8030
// Convert Double to Signed/Unsigned Quardword with truncation
8031
- multiclass avx512_cvttpd2qq<bits<8> opc, string OpcodeStr, SDNode OpNode,
8031
+ multiclass avx512_cvttpd2qq<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
8032
8032
SDNode MaskOpNode, SDNode OpNodeRnd,
8033
8033
X86SchedWriteWidths sched> {
8034
8034
let Predicates = [HasDQI] in {
@@ -8046,7 +8046,7 @@ multiclass avx512_cvttpd2qq<bits<8> opc, string OpcodeStr, SDNode OpNode,
8046
8046
}
8047
8047
8048
8048
// Convert Signed/Unsigned Quardword to Double
8049
- multiclass avx512_cvtqq2pd<bits<8> opc, string OpcodeStr, SDNode OpNode,
8049
+ multiclass avx512_cvtqq2pd<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
8050
8050
SDNode MaskOpNode, SDNode OpNodeRnd,
8051
8051
X86SchedWriteWidths sched> {
8052
8052
let Predicates = [HasDQI] in {
@@ -8091,7 +8091,7 @@ multiclass avx512_cvtps2qq<bits<8> opc, string OpcodeStr, SDNode OpNode,
8091
8091
}
8092
8092
8093
8093
// Convert Float to Signed/Unsigned Quardword with truncation
8094
- multiclass avx512_cvttps2qq<bits<8> opc, string OpcodeStr, SDNode OpNode,
8094
+ multiclass avx512_cvttps2qq<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
8095
8095
SDNode MaskOpNode, SDNode OpNodeRnd,
8096
8096
X86SchedWriteWidths sched> {
8097
8097
let Predicates = [HasDQI] in {
@@ -8118,7 +8118,7 @@ multiclass avx512_cvttps2qq<bits<8> opc, string OpcodeStr, SDNode OpNode,
8118
8118
}
8119
8119
8120
8120
// Convert Signed/Unsigned Quardword to Float
8121
- multiclass avx512_cvtqq2ps<bits<8> opc, string OpcodeStr, SDNode OpNode,
8121
+ multiclass avx512_cvtqq2ps<bits<8> opc, string OpcodeStr, SDPatternOperator OpNode,
8122
8122
SDNode MaskOpNode, SDNode OpNodeRnd,
8123
8123
X86SchedWriteWidths sched> {
8124
8124
let Predicates = [HasDQI] in {
@@ -10094,7 +10094,8 @@ defm VEXPANDPD : expand_by_elt_width <0x88, "vexpandpd", WriteVarShuffle256,
10094
10094
// op(broadcast(eltVt),imm)
10095
10095
//all instruction created with FROUND_CURRENT
10096
10096
multiclass avx512_unary_fp_packed_imm<bits<8> opc, string OpcodeStr,
10097
- SDNode OpNode, SDNode MaskOpNode,
10097
+ SDPatternOperator OpNode,
10098
+ SDPatternOperator MaskOpNode,
10098
10099
X86FoldableSchedWrite sched,
10099
10100
X86VectorVTInfo _> {
10100
10101
let ExeDomain = _.ExeDomain, Uses = [MXCSR], mayRaiseFPException = 1 in {
@@ -10139,8 +10140,8 @@ multiclass avx512_unary_fp_sae_packed_imm<bits<8> opc, string OpcodeStr,
10139
10140
}
10140
10141
10141
10142
multiclass avx512_common_unary_fp_sae_packed_imm<string OpcodeStr,
10142
- AVX512VLVectorVTInfo _, bits<8> opc, SDNode OpNode,
10143
- SDNode MaskOpNode, SDNode OpNodeSAE, X86SchedWriteWidths sched,
10143
+ AVX512VLVectorVTInfo _, bits<8> opc, SDPatternOperator OpNode,
10144
+ SDPatternOperator MaskOpNode, SDNode OpNodeSAE, X86SchedWriteWidths sched,
10144
10145
Predicate prd>{
10145
10146
let Predicates = [prd] in {
10146
10147
defm Z : avx512_unary_fp_packed_imm<opc, OpcodeStr, OpNode, MaskOpNode,
@@ -10338,8 +10339,8 @@ multiclass avx512_common_fp_sae_scalar_imm<string OpcodeStr,
10338
10339
}
10339
10340
10340
10341
multiclass avx512_common_unary_fp_sae_packed_imm_all<string OpcodeStr,
10341
- bits<8> opcPs, bits<8> opcPd, SDNode OpNode,
10342
- SDNode MaskOpNode, SDNode OpNodeSAE,
10342
+ bits<8> opcPs, bits<8> opcPd, SDPatternOperator OpNode,
10343
+ SDPatternOperator MaskOpNode, SDNode OpNodeSAE,
10343
10344
X86SchedWriteWidths sched, Predicate prd>{
10344
10345
defm PS : avx512_common_unary_fp_sae_packed_imm<OpcodeStr, avx512vl_f32_info,
10345
10346
opcPs, OpNode, MaskOpNode, OpNodeSAE, sched, prd>,
@@ -11563,7 +11564,7 @@ defm VFIXUPIMMPD : avx512_fixupimm_packed_all<SchedWriteFAdd, avx512vl_f64_info,
11563
11564
11564
11565
// TODO: Some canonicalization in lowering would simplify the number of
11565
11566
// patterns we have to try to match.
11566
- multiclass AVX512_scalar_math_fp_patterns<SDNode Op, SDNode MaskedOp,
11567
+ multiclass AVX512_scalar_math_fp_patterns<SDPatternOperator Op, SDNode MaskedOp,
11567
11568
string OpcPrefix, SDNode MoveNode,
11568
11569
X86VectorVTInfo _, PatLeaf ZeroFP> {
11569
11570
let Predicates = [HasAVX512] in {
@@ -11635,7 +11636,7 @@ defm : AVX512_scalar_math_fp_patterns<any_fsub, fsub, "SUBSD", X86Movsd, v2f64x_
11635
11636
defm : AVX512_scalar_math_fp_patterns<any_fmul, fmul, "MULSD", X86Movsd, v2f64x_info, fp64imm0>;
11636
11637
defm : AVX512_scalar_math_fp_patterns<any_fdiv, fdiv, "DIVSD", X86Movsd, v2f64x_info, fp64imm0>;
11637
11638
11638
- multiclass AVX512_scalar_unary_math_patterns<SDNode OpNode, string OpcPrefix,
11639
+ multiclass AVX512_scalar_unary_math_patterns<SDPatternOperator OpNode, string OpcPrefix,
11639
11640
SDNode Move, X86VectorVTInfo _> {
11640
11641
let Predicates = [HasAVX512] in {
11641
11642
def : Pat<(_.VT (Move _.VT:$dst,
0 commit comments