skan accepted this revision.
skan added a comment.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135933/new/
https://reviews.llvm.org/D135933
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
FreddyYe added inline comments.
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1453-1455
+emitMemModRMByte(MI, CurOp + 1, getX86RegNum(MI.getOperand(0)), TSFlags,
+ HasREX, StartByte, OS, Fixups, STI, false);
+CurOp = SrcRegNum + 3;
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,
pengfei accepted this revision.
pengfei added a comment.
This revision is now accepted and ready to land.
LGTM.
Comment at: llvm/lib/Target/X86/X86InstrInfo.td:3024
+//
+let Predicates = [HasCMPCCXADD, In64BitMode], Defs = [EFLAGS],
+Constraints = "$dstsrc2 = $dst" in {
skan added inline comments.
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp:32
int64_t Imm = MI->getOperand(Op).getImm();
+ bool flavor = MI->getOpcode() == X86::CMPCCXADDmr32 || X86::CMPCCXADDmr64;
switch (Imm) {
Capitalize 1st char
FreddyYe added inline comments.
Comment at: clang/lib/Headers/cmpccxaddintrin.h:19-34
+ _CMPCCX_O, /* Overflow. */
+ _CMPCCX_NO, /* No overflow. */
+ _CMPCCX_B, /* Below. */
+ _CMPCCX_NB, /* Not below. */
+ _CMPCCX_Z, /* Zero. */
+ _CMPCCX_NZ, /* Not zero.
craig.topper added inline comments.
Comment at: clang/lib/Headers/cmpccxaddintrin.h:19-34
+ _CMPCCX_O, /* Overflow. */
+ _CMPCCX_NO, /* No overflow. */
+ _CMPCCX_B, /* Below. */
+ _CMPCCX_NB, /* Not below. */
+ _CMPCCX_Z, /* Zero. */
+ _CMPCCX_NZ, /* Not
skan added inline comments.
Comment at: clang/lib/Headers/cmpccxaddintrin.h:19-34
+ _CMPCCX_O, /* Overflow. */
+ _CMPCCX_NO, /* No overflow. */
+ _CMPCCX_B, /* Below. */
+ _CMPCCX_NB, /* Not below. */
+ _CMPCCX_Z, /* Zero. */
+ _CMPCCX_NZ, /* Not zero. */
+
skan added inline comments.
Comment at: llvm/lib/Target/X86/X86InstrInfo.td:3035
+ "cmp${cond}xadd\t{$src3, $dst, $dstsrc1|$dstsrc1, $dst, $src3}",
+ [(set GR64:$dst, (X86cmpccxadd addr:$dstsrc1, GR64:$dstsrc2,
GR64:$src3, timm:$cond))]>,
+ VEX_4V,
pengfei added inline comments.
Comment at: clang/test/Driver/x86-target-features.c:313
+// RUN: %clang -target i686-unknown-linux-gnu -mcmpccxadd %s -### -o %t.o 2>&1
| FileCheck -check-prefix=CMPCCXADD %s
+// RUN: %clang -target i686-unknown-linux-gnu -mno-cmpccxadd %s -###
skan added inline comments.
Comment at: llvm/lib/Target/X86/X86InstrInfo.td:3028
+ (ins i32mem:$dstsrc1, GR32:$dstsrc2, GR32:$src3, ccode:$cond),
+ "cmp${cond}xadd\t{$src3, $dst, $dstsrc1|$dstsrc1, $dst, $src3}",
+ [(set GR32:$dst, (X86cmpccxadd
skan added inline comments.
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:28251
+ SDLoc DL(Op);
+ SDVTList VTs = DAG.getVTList(MVT::i32, MVT::Other);
+ SDValue Chain = Op.getOperand(0);
Unused?
Comment at:
pengfei added inline comments.
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:5643-5653
+case Intrinsic::x86_cmpccxadd32:
+case Intrinsic::x86_cmpccxadd64: {
+ Info.opc = ISD::INTRINSIC_W_CHAIN;
+ Info.ptrVal = I.getArgOperand(0);
+ unsigned Size =
craig.topper added inline comments.
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h:1071
return 1;
// Check for AVX-512 scatter which has a TIED_TO in the second to last
// operand.
craig.topper wrote:
> This comment is out of
FreddyYe marked 4 inline comments as done.
FreddyYe added inline comments.
Comment at: llvm/lib/Target/X86/X86InstrCompiler.td:1026
+let Predicates = [HasCMPCCXADD, In64BitMode], Defs = [EFLAGS],
+Constraints = "$dstsrc2 = $dst" in {
craig.topper wrote:
>
craig.topper added inline comments.
Comment at: clang/lib/Basic/Targets/X86.cpp:970
.Case("xsaveopt", true)
+ .Case("cmpccxadd", true)
.Default(false);
This list is alphabetized or was supposed to be
Comment at:
FreddyYe added inline comments.
Comment at: llvm/lib/Target/X86/X86.td:259
+"Support CMPCCXADD instructions",
+[FeatureAVX2]>;
def FeatureINVPCID : SubtargetFeature<"invpcid", "HasINVPCID", "true",
RKSimon added inline comments.
Comment at: llvm/test/MC/X86/x86-64-cmpccxadd-att.s:1
+// RUN: llvm-mc -triple x86_64 --show-encoding %s | FileCheck %s
+
Drop the -att.s and add intel test coverage?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST
craig.topper added inline comments.
Comment at: llvm/lib/Target/X86/X86InstrSSE.td:8118
+let Predicates = [HasCMPCCXADD, In64BitMode], Constraints = "$dstsrc2 = $dst"
in
+multiclass CMPCCXADD_BASE Opc, string OpcodeStr> {
craig.topper wrote:
> This feels like
craig.topper added inline comments.
Comment at: clang/include/clang/Basic/BuiltinsX86_64.def:138
+TARGET_BUILTIN(__builtin_ia32_cmpccxadd64, "SLLiv*SLLiSLLiIi", "n",
"cmpccxadd")
#undef BUILTIN
#undef TARGET_BUILTIN
There was a blank line here. Put it back.
craig.topper added inline comments.
Comment at: clang/lib/Basic/Targets/X86.cpp:781
+Builder.defineMacro("__CMPCCXADD__");
+ Builder.defineMacro("__CMPCCXADD_SUPPORTED__");
if (HasAVXVNNI)
What is __CMPCCXADD_SUPPORTED__ for?
Comment
RKSimon added inline comments.
Comment at: clang/test/CodeGen/X86/cmpccxadd-builtins-error.c:2
+// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown \
+// RUN: -target-feature +cmpccxadd -emit-llvm -fsyntax-only -verify
+
Add 32-bit test coverage
22 matches
Mail list logo