@@ -1375,38 +1375,40 @@ let Predicates = [HasBMI2, NoTBM, HasEGPR] in {
1375
1375
(MOV8ri (CountTrailingOnes imm:$mask)), sub_8bit))>;
1376
1376
}
1377
1377
1378
- multiclass bmi_pdep_pext<string mnemonic, RegisterClass RC ,
1378
+ multiclass bmi_pdep_pext<string mnemonic, X86TypeInfo t ,
1379
1379
X86MemOperand x86memop, SDPatternOperator OpNode,
1380
- PatFrag ld_frag, string Suffix = ""> {
1381
- def rr#Suffix : I<0xF5, MRMSrcReg, (outs RC:$dst), (ins RC:$src1, RC:$src2),
1382
- !strconcat(mnemonic, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
1383
- [(set RC:$dst, (OpNode RC:$src1, RC:$src2))]>,
1384
- NoCD8, VVVV, Sched<[WriteALU]>;
1385
- def rm#Suffix : I<0xF5, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, x86memop:$src2),
1386
- !strconcat(mnemonic, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
1387
- [(set RC:$dst, (OpNode RC:$src1, (ld_frag addr:$src2)))]>,
1388
- NoCD8, VVVV, Sched<[WriteALU.Folded, WriteALU.ReadAfterFold]>;
1380
+ PatFrag ld_frag, string suffix = ""> {
1381
+ def rr#suffix : ITy<0xF5, MRMSrcReg, t, (outs t.RegClass:$dst),
1382
+ (ins t.RegClass:$src1, t.RegClass:$src2),
1383
+ mnemonic, binop_ndd_args,
1384
+ [(set t.RegClass:$dst, (OpNode t.RegClass:$src1, t.RegClass:$src2))]>,
1385
+ VVVV, Sched<[WriteALU]>;
1386
+ def rm#suffix : ITy<0xF5, MRMSrcMem, t, (outs t.RegClass:$dst),
1387
+ (ins t.RegClass:$src1, x86memop:$src2),
1388
+ mnemonic, binop_ndd_args,
1389
+ [(set t.RegClass:$dst, (OpNode t.RegClass:$src1, (ld_frag addr:$src2)))]>,
1390
+ VVVV, Sched<[WriteALU.Folded, WriteALU.ReadAfterFold]>;
1389
1391
}
1390
1392
1391
1393
let Predicates = [HasBMI2, NoEGPR] in {
1392
- defm PDEP32 : bmi_pdep_pext<"pdep{l} ", GR32 , i32mem,
1394
+ defm PDEP32 : bmi_pdep_pext<"pdep", Xi32 , i32mem,
1393
1395
X86pdep, loadi32>, T8, XD, VEX;
1394
- defm PDEP64 : bmi_pdep_pext<"pdep{q} ", GR64 , i64mem,
1396
+ defm PDEP64 : bmi_pdep_pext<"pdep", Xi64 , i64mem,
1395
1397
X86pdep, loadi64>, T8, XD, REX_W, VEX;
1396
- defm PEXT32 : bmi_pdep_pext<"pext{l} ", GR32 , i32mem,
1398
+ defm PEXT32 : bmi_pdep_pext<"pext", Xi32 , i32mem,
1397
1399
X86pext, loadi32>, T8, XS, VEX;
1398
- defm PEXT64 : bmi_pdep_pext<"pext{q} ", GR64 , i64mem,
1400
+ defm PEXT64 : bmi_pdep_pext<"pext", Xi64 , i64mem,
1399
1401
X86pext, loadi64>, T8, XS, REX_W, VEX;
1400
1402
}
1401
1403
1402
1404
let Predicates = [HasBMI2, HasEGPR] in {
1403
- defm PDEP32 : bmi_pdep_pext<"pdep{l} ", GR32 , i32mem,
1405
+ defm PDEP32 : bmi_pdep_pext<"pdep", Xi32 , i32mem,
1404
1406
X86pdep, loadi32, "_EVEX">, T8, XD, EVEX;
1405
- defm PDEP64 : bmi_pdep_pext<"pdep{q} ", GR64 , i64mem,
1407
+ defm PDEP64 : bmi_pdep_pext<"pdep", Xi64 , i64mem,
1406
1408
X86pdep, loadi64, "_EVEX">, T8, XD, REX_W, EVEX;
1407
- defm PEXT32 : bmi_pdep_pext<"pext{l} ", GR32 , i32mem,
1409
+ defm PEXT32 : bmi_pdep_pext<"pext", Xi32 , i32mem,
1408
1410
X86pext, loadi32, "_EVEX">, T8, XS, EVEX;
1409
- defm PEXT64 : bmi_pdep_pext<"pext{q} ", GR64 , i64mem,
1411
+ defm PEXT64 : bmi_pdep_pext<"pext", Xi64 , i64mem,
1410
1412
X86pext, loadi64, "_EVEX">, T8, XS, REX_W, EVEX;
1411
1413
}
1412
1414
0 commit comments