[llvm] [X86] Fix position of immediate argument in AVX512 VPCMP comparisons (PR #116646)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 08:13:09 PST 2024
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/116646
The 'i' arg was being put between the 'm' and 'b' args instead of afterwards like other avx512 instructions (VCMPPS/D, VPERMILPS/D etc.).
>From 4b75fa220027c169697d1fb7a7070dc2433a034a Mon Sep 17 00:00:00 2001
From: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: Mon, 18 Nov 2024 16:12:15 +0000
Subject: [PATCH] [X86] Fix position of immediate argument in AVX512 VPCMP
comparisons
The 'i' arg was being put between the 'm' and 'b' args instead of afterwards like other avx512 instructions (VCMPPS/D, VPERMILPS/D etc.).
---
.../X86/MCTargetDesc/X86ATTInstPrinter.cpp | 24 +++++++++----------
.../MCTargetDesc/X86EncodingOptimization.cpp | 24 +++++++++----------
.../X86/MCTargetDesc/X86InstPrinterCommon.cpp | 24 +++++++++----------
.../X86/MCTargetDesc/X86IntelInstPrinter.cpp | 24 +++++++++----------
llvm/lib/Target/X86/X86InstrAVX512.td | 16 ++++++-------
llvm/lib/Target/X86/X86SchedIceLake.td | 22 ++++++++---------
llvm/lib/Target/X86/X86SchedSapphireRapids.td | 8 +++----
llvm/lib/Target/X86/X86SchedSkylakeServer.td | 22 ++++++++---------
8 files changed, 82 insertions(+), 82 deletions(-)
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
index 0f76808f55bc7d..b67c573e217ba4 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
@@ -318,18 +318,18 @@ bool X86ATTInstPrinter::printVecCompareInstr(const MCInst *MI,
case X86::VPCMPWZ128rmik: case X86::VPCMPWZ128rrik:
case X86::VPCMPWZ256rmik: case X86::VPCMPWZ256rrik:
case X86::VPCMPWZrmik: case X86::VPCMPWZrrik:
- case X86::VPCMPDZ128rmib: case X86::VPCMPDZ128rmibk:
- case X86::VPCMPDZ256rmib: case X86::VPCMPDZ256rmibk:
- case X86::VPCMPDZrmib: case X86::VPCMPDZrmibk:
- case X86::VPCMPQZ128rmib: case X86::VPCMPQZ128rmibk:
- case X86::VPCMPQZ256rmib: case X86::VPCMPQZ256rmibk:
- case X86::VPCMPQZrmib: case X86::VPCMPQZrmibk:
- case X86::VPCMPUDZ128rmib: case X86::VPCMPUDZ128rmibk:
- case X86::VPCMPUDZ256rmib: case X86::VPCMPUDZ256rmibk:
- case X86::VPCMPUDZrmib: case X86::VPCMPUDZrmibk:
- case X86::VPCMPUQZ128rmib: case X86::VPCMPUQZ128rmibk:
- case X86::VPCMPUQZ256rmib: case X86::VPCMPUQZ256rmibk:
- case X86::VPCMPUQZrmib: case X86::VPCMPUQZrmibk:
+ case X86::VPCMPDZ128rmbi: case X86::VPCMPDZ128rmbik:
+ case X86::VPCMPDZ256rmbi: case X86::VPCMPDZ256rmbik:
+ case X86::VPCMPDZrmbi: case X86::VPCMPDZrmbik:
+ case X86::VPCMPQZ128rmbi: case X86::VPCMPQZ128rmbik:
+ case X86::VPCMPQZ256rmbi: case X86::VPCMPQZ256rmbik:
+ case X86::VPCMPQZrmbi: case X86::VPCMPQZrmbik:
+ case X86::VPCMPUDZ128rmbi: case X86::VPCMPUDZ128rmbik:
+ case X86::VPCMPUDZ256rmbi: case X86::VPCMPUDZ256rmbik:
+ case X86::VPCMPUDZrmbi: case X86::VPCMPUDZrmbik:
+ case X86::VPCMPUQZ128rmbi: case X86::VPCMPUQZ128rmbik:
+ case X86::VPCMPUQZ256rmbi: case X86::VPCMPUQZ256rmbik:
+ case X86::VPCMPUQZrmbi: case X86::VPCMPUQZrmbik:
if ((Imm >= 0 && Imm <= 2) || (Imm >= 4 && Imm <= 6)) {
OS << '\t';
printVPCMPMnemonic(MI, OS);
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86EncodingOptimization.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86EncodingOptimization.cpp
index ba503756cf41a6..1e9d44068b3f3c 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86EncodingOptimization.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86EncodingOptimization.cpp
@@ -223,38 +223,38 @@ bool X86::optimizeVPCMPWithImmediateOneOrSix(MCInst &MI) {
FROM_TO(VPCMPBZrri, VPCMPEQBZrr, VPCMPGTBZrr)
FROM_TO(VPCMPBZrrik, VPCMPEQBZrrk, VPCMPGTBZrrk)
FROM_TO(VPCMPDZ128rmi, VPCMPEQDZ128rm, VPCMPGTDZ128rm)
- FROM_TO(VPCMPDZ128rmib, VPCMPEQDZ128rmb, VPCMPGTDZ128rmb)
- FROM_TO(VPCMPDZ128rmibk, VPCMPEQDZ128rmbk, VPCMPGTDZ128rmbk)
+ FROM_TO(VPCMPDZ128rmbi, VPCMPEQDZ128rmb, VPCMPGTDZ128rmb)
+ FROM_TO(VPCMPDZ128rmbik, VPCMPEQDZ128rmbk, VPCMPGTDZ128rmbk)
FROM_TO(VPCMPDZ128rmik, VPCMPEQDZ128rmk, VPCMPGTDZ128rmk)
FROM_TO(VPCMPDZ128rri, VPCMPEQDZ128rr, VPCMPGTDZ128rr)
FROM_TO(VPCMPDZ128rrik, VPCMPEQDZ128rrk, VPCMPGTDZ128rrk)
FROM_TO(VPCMPDZ256rmi, VPCMPEQDZ256rm, VPCMPGTDZ256rm)
- FROM_TO(VPCMPDZ256rmib, VPCMPEQDZ256rmb, VPCMPGTDZ256rmb)
- FROM_TO(VPCMPDZ256rmibk, VPCMPEQDZ256rmbk, VPCMPGTDZ256rmbk)
+ FROM_TO(VPCMPDZ256rmbi, VPCMPEQDZ256rmb, VPCMPGTDZ256rmb)
+ FROM_TO(VPCMPDZ256rmbik, VPCMPEQDZ256rmbk, VPCMPGTDZ256rmbk)
FROM_TO(VPCMPDZ256rmik, VPCMPEQDZ256rmk, VPCMPGTDZ256rmk)
FROM_TO(VPCMPDZ256rri, VPCMPEQDZ256rr, VPCMPGTDZ256rr)
FROM_TO(VPCMPDZ256rrik, VPCMPEQDZ256rrk, VPCMPGTDZ256rrk)
FROM_TO(VPCMPDZrmi, VPCMPEQDZrm, VPCMPGTDZrm)
- FROM_TO(VPCMPDZrmib, VPCMPEQDZrmb, VPCMPGTDZrmb)
- FROM_TO(VPCMPDZrmibk, VPCMPEQDZrmbk, VPCMPGTDZrmbk)
+ FROM_TO(VPCMPDZrmbi, VPCMPEQDZrmb, VPCMPGTDZrmb)
+ FROM_TO(VPCMPDZrmbik, VPCMPEQDZrmbk, VPCMPGTDZrmbk)
FROM_TO(VPCMPDZrmik, VPCMPEQDZrmk, VPCMPGTDZrmk)
FROM_TO(VPCMPDZrri, VPCMPEQDZrr, VPCMPGTDZrr)
FROM_TO(VPCMPDZrrik, VPCMPEQDZrrk, VPCMPGTDZrrk)
FROM_TO(VPCMPQZ128rmi, VPCMPEQQZ128rm, VPCMPGTQZ128rm)
- FROM_TO(VPCMPQZ128rmib, VPCMPEQQZ128rmb, VPCMPGTQZ128rmb)
- FROM_TO(VPCMPQZ128rmibk, VPCMPEQQZ128rmbk, VPCMPGTQZ128rmbk)
+ FROM_TO(VPCMPQZ128rmbi, VPCMPEQQZ128rmb, VPCMPGTQZ128rmb)
+ FROM_TO(VPCMPQZ128rmbik, VPCMPEQQZ128rmbk, VPCMPGTQZ128rmbk)
FROM_TO(VPCMPQZ128rmik, VPCMPEQQZ128rmk, VPCMPGTQZ128rmk)
FROM_TO(VPCMPQZ128rri, VPCMPEQQZ128rr, VPCMPGTQZ128rr)
FROM_TO(VPCMPQZ128rrik, VPCMPEQQZ128rrk, VPCMPGTQZ128rrk)
FROM_TO(VPCMPQZ256rmi, VPCMPEQQZ256rm, VPCMPGTQZ256rm)
- FROM_TO(VPCMPQZ256rmib, VPCMPEQQZ256rmb, VPCMPGTQZ256rmb)
- FROM_TO(VPCMPQZ256rmibk, VPCMPEQQZ256rmbk, VPCMPGTQZ256rmbk)
+ FROM_TO(VPCMPQZ256rmbi, VPCMPEQQZ256rmb, VPCMPGTQZ256rmb)
+ FROM_TO(VPCMPQZ256rmbik, VPCMPEQQZ256rmbk, VPCMPGTQZ256rmbk)
FROM_TO(VPCMPQZ256rmik, VPCMPEQQZ256rmk, VPCMPGTQZ256rmk)
FROM_TO(VPCMPQZ256rri, VPCMPEQQZ256rr, VPCMPGTQZ256rr)
FROM_TO(VPCMPQZ256rrik, VPCMPEQQZ256rrk, VPCMPGTQZ256rrk)
FROM_TO(VPCMPQZrmi, VPCMPEQQZrm, VPCMPGTQZrm)
- FROM_TO(VPCMPQZrmib, VPCMPEQQZrmb, VPCMPGTQZrmb)
- FROM_TO(VPCMPQZrmibk, VPCMPEQQZrmbk, VPCMPGTQZrmbk)
+ FROM_TO(VPCMPQZrmbi, VPCMPEQQZrmb, VPCMPGTQZrmb)
+ FROM_TO(VPCMPQZrmbik, VPCMPEQQZrmbk, VPCMPGTQZrmbk)
FROM_TO(VPCMPQZrmik, VPCMPEQQZrmk, VPCMPGTQZrmk)
FROM_TO(VPCMPQZrri, VPCMPEQQZrr, VPCMPGTQZrr)
FROM_TO(VPCMPQZrrik, VPCMPEQQZrrk, VPCMPGTQZrrk)
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
index 51b82321d679bf..fafcc737ff983d 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
@@ -168,9 +168,9 @@ void X86InstPrinterCommon::printVPCMPMnemonic(const MCInst *MI,
case X86::VPCMPDZ128rmik: case X86::VPCMPDZ128rrik:
case X86::VPCMPDZ256rmik: case X86::VPCMPDZ256rrik:
case X86::VPCMPDZrmik: case X86::VPCMPDZrrik:
- case X86::VPCMPDZ128rmib: case X86::VPCMPDZ128rmibk:
- case X86::VPCMPDZ256rmib: case X86::VPCMPDZ256rmibk:
- case X86::VPCMPDZrmib: case X86::VPCMPDZrmibk:
+ case X86::VPCMPDZ128rmbi: case X86::VPCMPDZ128rmbik:
+ case X86::VPCMPDZ256rmbi: case X86::VPCMPDZ256rmbik:
+ case X86::VPCMPDZrmbi: case X86::VPCMPDZrmbik:
OS << "d\t";
break;
case X86::VPCMPQZ128rmi: case X86::VPCMPQZ128rri:
@@ -179,9 +179,9 @@ void X86InstPrinterCommon::printVPCMPMnemonic(const MCInst *MI,
case X86::VPCMPQZ128rmik: case X86::VPCMPQZ128rrik:
case X86::VPCMPQZ256rmik: case X86::VPCMPQZ256rrik:
case X86::VPCMPQZrmik: case X86::VPCMPQZrrik:
- case X86::VPCMPQZ128rmib: case X86::VPCMPQZ128rmibk:
- case X86::VPCMPQZ256rmib: case X86::VPCMPQZ256rmibk:
- case X86::VPCMPQZrmib: case X86::VPCMPQZrmibk:
+ case X86::VPCMPQZ128rmbi: case X86::VPCMPQZ128rmbik:
+ case X86::VPCMPQZ256rmbi: case X86::VPCMPQZ256rmbik:
+ case X86::VPCMPQZrmbi: case X86::VPCMPQZrmbik:
OS << "q\t";
break;
case X86::VPCMPUBZ128rmi: case X86::VPCMPUBZ128rri:
@@ -198,9 +198,9 @@ void X86InstPrinterCommon::printVPCMPMnemonic(const MCInst *MI,
case X86::VPCMPUDZ128rmik: case X86::VPCMPUDZ128rrik:
case X86::VPCMPUDZ256rmik: case X86::VPCMPUDZ256rrik:
case X86::VPCMPUDZrmik: case X86::VPCMPUDZrrik:
- case X86::VPCMPUDZ128rmib: case X86::VPCMPUDZ128rmibk:
- case X86::VPCMPUDZ256rmib: case X86::VPCMPUDZ256rmibk:
- case X86::VPCMPUDZrmib: case X86::VPCMPUDZrmibk:
+ case X86::VPCMPUDZ128rmbi: case X86::VPCMPUDZ128rmbik:
+ case X86::VPCMPUDZ256rmbi: case X86::VPCMPUDZ256rmbik:
+ case X86::VPCMPUDZrmbi: case X86::VPCMPUDZrmbik:
OS << "ud\t";
break;
case X86::VPCMPUQZ128rmi: case X86::VPCMPUQZ128rri:
@@ -209,9 +209,9 @@ void X86InstPrinterCommon::printVPCMPMnemonic(const MCInst *MI,
case X86::VPCMPUQZ128rmik: case X86::VPCMPUQZ128rrik:
case X86::VPCMPUQZ256rmik: case X86::VPCMPUQZ256rrik:
case X86::VPCMPUQZrmik: case X86::VPCMPUQZrrik:
- case X86::VPCMPUQZ128rmib: case X86::VPCMPUQZ128rmibk:
- case X86::VPCMPUQZ256rmib: case X86::VPCMPUQZ256rmibk:
- case X86::VPCMPUQZrmib: case X86::VPCMPUQZrmibk:
+ case X86::VPCMPUQZ128rmbi: case X86::VPCMPUQZ128rmbik:
+ case X86::VPCMPUQZ256rmbi: case X86::VPCMPUQZ256rmbik:
+ case X86::VPCMPUQZrmbi: case X86::VPCMPUQZrmbik:
OS << "uq\t";
break;
case X86::VPCMPUWZ128rmi: case X86::VPCMPUWZ128rri:
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
index c2b284ad924d00..680092679c9031 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
@@ -295,18 +295,18 @@ bool X86IntelInstPrinter::printVecCompareInstr(const MCInst *MI, raw_ostream &OS
case X86::VPCMPWZ128rmik: case X86::VPCMPWZ128rrik:
case X86::VPCMPWZ256rmik: case X86::VPCMPWZ256rrik:
case X86::VPCMPWZrmik: case X86::VPCMPWZrrik:
- case X86::VPCMPDZ128rmib: case X86::VPCMPDZ128rmibk:
- case X86::VPCMPDZ256rmib: case X86::VPCMPDZ256rmibk:
- case X86::VPCMPDZrmib: case X86::VPCMPDZrmibk:
- case X86::VPCMPQZ128rmib: case X86::VPCMPQZ128rmibk:
- case X86::VPCMPQZ256rmib: case X86::VPCMPQZ256rmibk:
- case X86::VPCMPQZrmib: case X86::VPCMPQZrmibk:
- case X86::VPCMPUDZ128rmib: case X86::VPCMPUDZ128rmibk:
- case X86::VPCMPUDZ256rmib: case X86::VPCMPUDZ256rmibk:
- case X86::VPCMPUDZrmib: case X86::VPCMPUDZrmibk:
- case X86::VPCMPUQZ128rmib: case X86::VPCMPUQZ128rmibk:
- case X86::VPCMPUQZ256rmib: case X86::VPCMPUQZ256rmibk:
- case X86::VPCMPUQZrmib: case X86::VPCMPUQZrmibk:
+ case X86::VPCMPDZ128rmbi: case X86::VPCMPDZ128rmbik:
+ case X86::VPCMPDZ256rmbi: case X86::VPCMPDZ256rmbik:
+ case X86::VPCMPDZrmbi: case X86::VPCMPDZrmbik:
+ case X86::VPCMPQZ128rmbi: case X86::VPCMPQZ128rmbik:
+ case X86::VPCMPQZ256rmbi: case X86::VPCMPQZ256rmbik:
+ case X86::VPCMPQZrmbi: case X86::VPCMPQZrmbik:
+ case X86::VPCMPUDZ128rmbi: case X86::VPCMPUDZ128rmbik:
+ case X86::VPCMPUDZ256rmbi: case X86::VPCMPUDZ256rmbik:
+ case X86::VPCMPUDZrmbi: case X86::VPCMPUDZrmbik:
+ case X86::VPCMPUQZ128rmbi: case X86::VPCMPUQZ128rmbik:
+ case X86::VPCMPUQZ256rmbi: case X86::VPCMPUQZ256rmbik:
+ case X86::VPCMPUQZrmbi: case X86::VPCMPUQZrmbik:
if ((Imm >= 0 && Imm <= 2) || (Imm >= 4 && Imm <= 6)) {
OS << '\t';
printVPCMPMnemonic(MI, OS);
diff --git a/llvm/lib/Target/X86/X86InstrAVX512.td b/llvm/lib/Target/X86/X86InstrAVX512.td
index 9480838e8a7bdf..e54bc5a5694226 100644
--- a/llvm/lib/Target/X86/X86InstrAVX512.td
+++ b/llvm/lib/Target/X86/X86InstrAVX512.td
@@ -2190,7 +2190,7 @@ multiclass avx512_icmp_cc_rmb<bits<8> opc, string Suffix, PatFrag Frag,
PatFrag Frag_su, X86FoldableSchedWrite sched,
X86VectorVTInfo _, string Name> :
avx512_icmp_cc<opc, Suffix, Frag, Frag_su, sched, _, Name> {
- def rmib : AVX512AIi8<opc, MRMSrcMem,
+ def rmbi : AVX512AIi8<opc, MRMSrcMem,
(outs _.KRC:$dst), (ins _.RC:$src1, _.ScalarMemOp:$src2,
u8imm:$cc),
!strconcat("vpcmp", Suffix,
@@ -2201,7 +2201,7 @@ multiclass avx512_icmp_cc_rmb<bits<8> opc, string Suffix, PatFrag Frag,
(_.BroadcastLdFrag addr:$src2),
cond)))]>,
EVEX, VVVV, EVEX_B, Sched<[sched.Folded, sched.ReadAfterFold]>;
- def rmibk : AVX512AIi8<opc, MRMSrcMem,
+ def rmbik : AVX512AIi8<opc, MRMSrcMem,
(outs _.KRC:$dst), (ins _.KRCWM:$mask, _.RC:$src1,
_.ScalarMemOp:$src2, u8imm:$cc),
!strconcat("vpcmp", Suffix,
@@ -2216,13 +2216,13 @@ multiclass avx512_icmp_cc_rmb<bits<8> opc, string Suffix, PatFrag Frag,
def : Pat<(_.KVT (Frag:$cc (_.BroadcastLdFrag addr:$src2),
(_.VT _.RC:$src1), cond)),
- (!cast<Instruction>(Name#_.ZSuffix#"rmib")
+ (!cast<Instruction>(Name#_.ZSuffix#"rmbi")
_.RC:$src1, addr:$src2, (X86pcmpm_imm_commute $cc))>;
def : Pat<(and _.KRCWM:$mask,
(_.KVT (Frag_su:$cc (_.BroadcastLdFrag addr:$src2),
(_.VT _.RC:$src1), cond))),
- (!cast<Instruction>(Name#_.ZSuffix#"rmibk")
+ (!cast<Instruction>(Name#_.ZSuffix#"rmbik")
_.KRCWM:$mask, _.RC:$src1, addr:$src2,
(X86pcmpm_imm_commute $cc))>;
}
@@ -2992,7 +2992,7 @@ multiclass axv512_icmp_packed_cc_rmb_no_vlx_lowering<PatFrag Frag, PatFrag Frag_
def : Pat<(Narrow.KVT (Frag:$cc (Narrow.VT Narrow.RC:$src1),
(Narrow.BroadcastLdFrag addr:$src2), cond)),
(COPY_TO_REGCLASS
- (!cast<Instruction>(InstStr#"Zrmib")
+ (!cast<Instruction>(InstStr#"Zrmbi")
(Wide.VT (INSERT_SUBREG (IMPLICIT_DEF), Narrow.RC:$src1, Narrow.SubRegIdx)),
addr:$src2, (X86pcmpm_imm $cc)), Narrow.KRC)>;
@@ -3001,7 +3001,7 @@ def : Pat<(Narrow.KVT (and Narrow.KRC:$mask,
(Frag_su:$cc (Narrow.VT Narrow.RC:$src1),
(Narrow.BroadcastLdFrag addr:$src2),
cond)))),
- (COPY_TO_REGCLASS (!cast<Instruction>(InstStr#"Zrmibk")
+ (COPY_TO_REGCLASS (!cast<Instruction>(InstStr#"Zrmbik")
(COPY_TO_REGCLASS Narrow.KRC:$mask, Wide.KRC),
(Wide.VT (INSERT_SUBREG (IMPLICIT_DEF), Narrow.RC:$src1, Narrow.SubRegIdx)),
addr:$src2, (X86pcmpm_imm $cc)), Narrow.KRC)>;
@@ -3011,7 +3011,7 @@ def : Pat<(Narrow.KVT (Frag:$cc (Narrow.BroadcastLdFrag addr:$src2),
(Narrow.VT Narrow.RC:$src1),
cond)),
(COPY_TO_REGCLASS
- (!cast<Instruction>(InstStr#"Zrmib")
+ (!cast<Instruction>(InstStr#"Zrmbi")
(Wide.VT (INSERT_SUBREG (IMPLICIT_DEF), Narrow.RC:$src1, Narrow.SubRegIdx)),
addr:$src2, (X86pcmpm_imm_commute $cc)), Narrow.KRC)>;
@@ -3020,7 +3020,7 @@ def : Pat<(Narrow.KVT (and Narrow.KRC:$mask,
(Frag_su:$cc (Narrow.BroadcastLdFrag addr:$src2),
(Narrow.VT Narrow.RC:$src1),
cond)))),
- (COPY_TO_REGCLASS (!cast<Instruction>(InstStr#"Zrmibk")
+ (COPY_TO_REGCLASS (!cast<Instruction>(InstStr#"Zrmbik")
(COPY_TO_REGCLASS Narrow.KRC:$mask, Wide.KRC),
(Wide.VT (INSERT_SUBREG (IMPLICIT_DEF), Narrow.RC:$src1, Narrow.SubRegIdx)),
addr:$src2, (X86pcmpm_imm_commute $cc)), Narrow.KRC)>;
diff --git a/llvm/lib/Target/X86/X86SchedIceLake.td b/llvm/lib/Target/X86/X86SchedIceLake.td
index a5051d932d4e21..1779c63e94d0bc 100644
--- a/llvm/lib/Target/X86/X86SchedIceLake.td
+++ b/llvm/lib/Target/X86/X86SchedIceLake.td
@@ -1730,13 +1730,13 @@ def: InstRW<[ICXWriteResGroup136_2], (instregex "VCMP(PD|PS)Z128rm(b?)i",
"VCMP(SD|SS)Zrm",
"VFPCLASSPDZ128rm(b?)",
"VFPCLASSPSZ128rm(b?)",
- "VPCMPBZ128rmi(b?)",
- "VPCMPDZ128rmi(b?)",
+ "VPCMPBZ128rm(b?)i",
+ "VPCMPDZ128rm(b?)i",
"VPCMPEQ(B|D|Q|W)Z128rm(b?)",
"VPCMPGT(B|D|Q|W)Z128rm(b?)",
- "VPCMPQZ128rmi(b?)",
- "VPCMPU(B|D|Q|W)Z128rmi(b?)",
- "VPCMPWZ128rmi(b?)",
+ "VPCMPQZ128rm(b?)i",
+ "VPCMPU(B|D|Q|W)Z128rm(b?)i",
+ "VPCMPWZ128rm(b?)i",
"(V?)PACK(U|S)S(DW|WB)(Z128)?rm",
"VPTESTMBZ128rm(b?)",
"VPTESTMDZ128rm(b?)",
@@ -1795,8 +1795,8 @@ def: InstRW<[ICXWriteResGroup148_2], (instregex "VCMPPD(Z|Z256)rm(b?)i",
"VCMPPS(Z|Z256)rm(b?)i",
"VFPCLASSPD(Z|Z256)rm(b?)",
"VFPCLASSPS(Z|Z256)rm(b?)",
- "VPCMPB(Z|Z256)rmi(b?)",
- "VPCMPD(Z|Z256)rmi(b?)",
+ "VPCMPB(Z|Z256)rm(b?)i",
+ "VPCMPD(Z|Z256)rm(b?)i",
"VPCMPEQB(Z|Z256)rm(b?)",
"VPCMPEQD(Z|Z256)rm(b?)",
"VPCMPEQQ(Z|Z256)rm(b?)",
@@ -1805,10 +1805,10 @@ def: InstRW<[ICXWriteResGroup148_2], (instregex "VCMPPD(Z|Z256)rm(b?)i",
"VPCMPGTD(Z|Z256)rm(b?)",
"VPCMPGTQ(Z|Z256)rm(b?)",
"VPCMPGTW(Z|Z256)rm(b?)",
- "VPCMPQ(Z|Z256)rmi(b?)",
- "VPCMPU(B|D|Q|W)Z256rmi(b?)",
- "VPCMPU(B|D|Q|W)Zrmi(b?)",
- "VPCMPW(Z|Z256)rmi(b?)",
+ "VPCMPQ(Z|Z256)rm(b?)i",
+ "VPCMPU(B|D|Q|W)Z256rm(b?)i",
+ "VPCMPU(B|D|Q|W)Zrm(b?)i",
+ "VPCMPW(Z|Z256)rm(b?)i",
"(V?)PACK(U|S)S(DW|WB)(Y|Z|Z256)rm",
"VPTESTM(B|D|Q|W)Z256rm(b?)",
"VPTESTM(B|D|Q|W)Zrm(b?)",
diff --git a/llvm/lib/Target/X86/X86SchedSapphireRapids.td b/llvm/lib/Target/X86/X86SchedSapphireRapids.td
index 0545f9b7f4c00e..55da82325ef652 100644
--- a/llvm/lib/Target/X86/X86SchedSapphireRapids.td
+++ b/llvm/lib/Target/X86/X86SchedSapphireRapids.td
@@ -2726,22 +2726,22 @@ def : InstRW<[SPRWriteResGroup263, ReadAfterVecXLd], (instregex "^VCMPP(D|H|S)Z1
"^VCMPP(D|H|S)Z128rm(i|bik)$",
"^VFPCLASSP(D|H|S)Z128rm(b?)k$",
"^VPCMP(B|D|Q|W|UD|UQ|UW)Z128rmi(k?)$",
- "^VPCMP(D|Q|UQ)Z128rmib(k?)$",
+ "^VPCMP(D|Q|UQ)Z128rmbi(k?)$",
"^VPCMP(EQ|GT)(B|D|Q|W)Z128rm(k?)$",
"^VPCMP(EQ|GT)(D|Q)Z128rmb(k?)$",
"^VPCMPUBZ128rmi(k?)$",
- "^VPCMPUDZ128rmib(k?)$",
+ "^VPCMPUDZ128rmbi(k?)$",
"^VPTEST(N?)M(B|D|Q|W)Z128rm(k?)$",
"^VPTEST(N?)M(D|Q)Z128rmb(k?)$")>;
def : InstRW<[SPRWriteResGroup263, ReadAfterVecYLd], (instregex "^VCMPP(D|H|S)Z((256)?)rm(bi|ik)$",
"^VCMPP(D|H|S)Z((256)?)rm(i|bik)$",
"^VFPCLASSP(D|H|S)Z((256)?)rm(b?)k$",
"^VPCMP(B|D|Q|W|UD|UQ|UW)Z((256)?)rmi(k?)$",
- "^VPCMP(D|Q|UQ)Z((256)?)rmib(k?)$",
+ "^VPCMP(D|Q|UQ)Z((256)?)rmbi(k?)$",
"^VPCMP(EQ|GT)(B|D|Q|W)Z((256)?)rm(k?)$",
"^VPCMP(EQ|GT)(D|Q)Z((256)?)rmb(k?)$",
"^VPCMPUBZ((256)?)rmi(k?)$",
- "^VPCMPUDZ((256)?)rmib(k?)$",
+ "^VPCMPUDZ((256)?)rmbi(k?)$",
"^VPTEST(N?)M(B|D|Q|W)Z((256)?)rm(k?)$",
"^VPTEST(N?)M(D|Q)Z((256)?)rmb(k?)$")>;
def : InstRW<[SPRWriteResGroup263, ReadAfterVecLd], (instregex "^VCMPS(D|H|S)Zrmi$",
diff --git a/llvm/lib/Target/X86/X86SchedSkylakeServer.td b/llvm/lib/Target/X86/X86SchedSkylakeServer.td
index e733d9ac74dd84..189226611f926f 100644
--- a/llvm/lib/Target/X86/X86SchedSkylakeServer.td
+++ b/llvm/lib/Target/X86/X86SchedSkylakeServer.td
@@ -1701,13 +1701,13 @@ def: InstRW<[SKXWriteResGroup136_2], (instregex "VCMP(PD|PS)Z128rm(b?)i",
"VCMP(SD|SS)Zrm",
"VFPCLASSPDZ128rm(b?)",
"VFPCLASSPSZ128rm(b?)",
- "VPCMPBZ128rmi(b?)",
- "VPCMPDZ128rmi(b?)",
+ "VPCMPBZ128rm(b?)i",
+ "VPCMPDZ128rm(b?)i",
"VPCMPEQ(B|D|Q|W)Z128rm(b?)",
"VPCMPGT(B|D|Q|W)Z128rm(b?)",
- "VPCMPQZ128rmi(b?)",
- "VPCMPU(B|D|Q|W)Z128rmi(b?)",
- "VPCMPWZ128rmi(b?)",
+ "VPCMPQZ128rm(b?)i",
+ "VPCMPU(B|D|Q|W)Z128rm(b?)i",
+ "VPCMPWZ128rm(b?)i",
"VPTESTMBZ128rm(b?)",
"VPTESTMDZ128rm(b?)",
"VPTESTMQZ128rm(b?)",
@@ -1765,8 +1765,8 @@ def: InstRW<[SKXWriteResGroup148_2], (instregex "VCMPPD(Z|Z256)rm(b?)i",
"VCMPPS(Z|Z256)rm(b?)i",
"VFPCLASSPD(Z|Z256)rm(b?)",
"VFPCLASSPS(Z|Z256)rm(b?)",
- "VPCMPB(Z|Z256)rmi(b?)",
- "VPCMPD(Z|Z256)rmi(b?)",
+ "VPCMPB(Z|Z256)rm(b?)i",
+ "VPCMPD(Z|Z256)rm(b?)i",
"VPCMPEQB(Z|Z256)rm(b?)",
"VPCMPEQD(Z|Z256)rm(b?)",
"VPCMPEQQ(Z|Z256)rm(b?)",
@@ -1775,10 +1775,10 @@ def: InstRW<[SKXWriteResGroup148_2], (instregex "VCMPPD(Z|Z256)rm(b?)i",
"VPCMPGTD(Z|Z256)rm(b?)",
"VPCMPGTQ(Z|Z256)rm(b?)",
"VPCMPGTW(Z|Z256)rm(b?)",
- "VPCMPQ(Z|Z256)rmi(b?)",
- "VPCMPU(B|D|Q|W)Z256rmi(b?)",
- "VPCMPU(B|D|Q|W)Zrmi(b?)",
- "VPCMPW(Z|Z256)rmi(b?)",
+ "VPCMPQ(Z|Z256)rm(b?)i",
+ "VPCMPU(B|D|Q|W)Z256rm(b?)i",
+ "VPCMPU(B|D|Q|W)Zrm(b?)i",
+ "VPCMPW(Z|Z256)rm(b?)i",
"VPTESTM(B|D|Q|W)Z256rm(b?)",
"VPTESTM(B|D|Q|W)Zrm(b?)",
"VPTESTNM(B|D|Q|W)Z256rm(b?)",
More information about the llvm-commits
mailing list