[llvm] [X86][MC] Support Enc/Dec for EGPR for promoted CMPCCXADD instruction (PR #76125)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 21 18:41:29 PST 2023
================
@@ -1680,6 +1680,23 @@ def CMPCCXADDmr64 : I<0xe0, MRMDestMem4VOp3CC, (outs GR64:$dst),
VEX_4V, REX_W, T8PD, Sched<[WriteXCHG]>;
}
+let Predicates = [HasCMPCCXADD, HasEGPR, In64BitMode] in {
+def CMPCCXADDmr32_EVEX : I<0xe0, MRMDestMem4VOp3CC, (outs GR32:$dst),
+ (ins GR32:$dstsrc1, i32mem:$dstsrc2, GR32:$src3, ccode:$cond),
+ "cmp${cond}xadd\t{$src3, $dst, $dstsrc2|$dstsrc2, $dst, $src3}",
+ [(set GR32:$dst, (X86cmpccxadd addr:$dstsrc2,
+ GR32:$dstsrc1, GR32:$src3, timm:$cond))]>,
+ EVEX_4V, NoCD8, T8PD, Sched<[WriteXCHG]>;
+
+def CMPCCXADDmr64_EVEX : I<0xe0, MRMDestMem4VOp3CC, (outs GR64:$dst),
+ (ins GR64:$dstsrc1, i64mem:$dstsrc2, GR64:$src3, ccode:$cond),
+ "cmp${cond}xadd\t{$src3, $dst, $dstsrc2|$dstsrc2, $dst, $src3}",
+ [(set GR64:$dst, (X86cmpccxadd addr:$dstsrc2,
+ GR64:$dstsrc1, GR64:$src3, timm:$cond))]>,
+ EVEX_4V, NoCD8, REX_W, T8PD, Sched<[WriteXCHG]>;
----------------
KanRobert wrote:
Need to rebase for `EVEX_4V` -> `EVEX, VVVV`.
https://github.com/llvm/llvm-project/pull/76125
More information about the llvm-commits
mailing list