llvm.org GIT mirror llvm / 7624a6e
[X86] Move Atomic CMPXCHG to WriteCMPXCHGRMW schedule class git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343700 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 1 year, 9 months ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
788788
789789 multiclass LCMPXCHG_BinOp Opc8, bits<8> Opc, Format Form,
790790 string mnemonic, SDPatternOperator frag> {
791 let isCodeGenOnly = 1, SchedRW = [WriteALULd, WriteRMW] in {
791 let isCodeGenOnly = 1, SchedRW = [WriteCMPXCHGRMW] in {
792792 let Defs = [AL, EFLAGS], Uses = [AL] in
793793 def NAME#8 : I
794794 !strconcat(mnemonic, "{b}\t{$swap, $ptr|$ptr, $swap}"),
809809 }
810810
811811 let Defs = [EAX, EDX, EFLAGS], Uses = [EAX, EBX, ECX, EDX],
812 SchedRW = [WriteALULd, WriteRMW] in {
812 SchedRW = [WriteCMPXCHGRMW] in {
813813 defm LCMPXCHG8B : LCMPXCHG_UnOp<0xC7, MRM1m, "cmpxchg8b", X86cas8, i64mem>;
814814 }
815815
833833 // the instruction and we are sure we will have a valid register to restore
834834 // the value of RBX.
835835 let Defs = [EAX, EDX, EBX, EFLAGS], Uses = [EAX, ECX, EDX],
836 SchedRW = [WriteALULd, WriteRMW], isCodeGenOnly = 1, isPseudo = 1,
836 SchedRW = [WriteCMPXCHGRMW], isCodeGenOnly = 1, isPseudo = 1,
837837 Constraints = "$ebx_save = $dst", usesCustomInserter = 1 in {
838838 def LCMPXCHG8B_SAVE_EBX :
839839 I<0, Pseudo, (outs GR32:$dst),
845845
846846
847847 let Defs = [RAX, RDX, EFLAGS], Uses = [RAX, RBX, RCX, RDX],
848 Predicates = [HasCmpxchg16b], SchedRW = [WriteALULd, WriteRMW] in {
848 Predicates = [HasCmpxchg16b], SchedRW = [WriteCMPXCHGRMW] in {
849849 defm LCMPXCHG16B : LCMPXCHG_UnOp<0xC7, MRM1m, "cmpxchg16b",
850850 X86cas16, i128mem>, REX_W;
851851 }
852852
853853 // Same as LCMPXCHG8B_SAVE_RBX but for the 16 Bytes variant.
854854 let Defs = [RAX, RDX, RBX, EFLAGS], Uses = [RAX, RCX, RDX],
855 Predicates = [HasCmpxchg16b], SchedRW = [WriteALULd, WriteRMW],
855 Predicates = [HasCmpxchg16b], SchedRW = [WriteCMPXCHGRMW],
856856 isCodeGenOnly = 1, isPseudo = 1, Constraints = "$rbx_save = $dst",
857857 usesCustomInserter = 1 in {
858858 def LCMPXCHG16B_SAVE_RBX :