[PATCH] D135933: [X86] Add CMPCCXADD instructions.

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 01:50:56 PDT 2022


skan added inline comments.


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.td:3027
+def CMPCCXADDmr32 : I<0xe0, MRMDestMem4VOp3CC, (outs GR32:$dst),
+          (ins GR32:$dstsrc2, i32mem:$dstsrc1, GR32:$src3, ccode:$cond),
+          "cmp${cond}xadd\t{$src3, $dst, $dstsrc1|$dstsrc1, $dst, $src3}",
----------------
Could you use "GR32:$dstsrc1, i32mem:$dstsrc2" instead?


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.td:3024
+//
+let Predicates = [HasCMPCCXADD, In64BitMode], Defs = [EFLAGS],
+    Constraints = "$dstsrc2 = $dst" in {
----------------
pengfei wrote:
> skan wrote:
> > Should we set isCodeGenOnly =1 here?
> Should also set `mayLoad` and `mayStore`?
Yeah, I think so.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135933/new/

https://reviews.llvm.org/D135933



More information about the llvm-commits mailing list