[llvm] 0649594 - [M68k] Swap operands of atomic_store after D123143

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 10 15:17:35 PDT 2023


Author: Fangrui Song
Date: 2023-09-10T15:17:30-07:00
New Revision: 0649594e249f215d27a3fc109758f0e7f1a069bf

URL: https://github.com/llvm/llvm-project/commit/0649594e249f215d27a3fc109758f0e7f1a069bf
DIFF: https://github.com/llvm/llvm-project/commit/0649594e249f215d27a3fc109758f0e7f1a069bf.diff

LOG: [M68k] Swap operands of atomic_store after D123143

Added: 
    

Modified: 
    llvm/lib/Target/M68k/M68kInstrAtomics.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/M68k/M68kInstrAtomics.td b/llvm/lib/Target/M68k/M68kInstrAtomics.td
index 6be53d469bbcd17..40c6593e2cfa51c 100644
--- a/llvm/lib/Target/M68k/M68kInstrAtomics.td
+++ b/llvm/lib/Target/M68k/M68kInstrAtomics.td
@@ -10,8 +10,7 @@ foreach size = [8, 16, 32] in {
   def : Pat<(!cast<SDPatternOperator>("atomic_load_"#size) MxCP_ARI:$ptr),
             (!cast<MxInst>("MOV"#size#"dj") !cast<MxMemOp>("MxARI"#size):$ptr)>;
 
-  def : Pat<(!cast<SDPatternOperator>("atomic_store_"#size) MxCP_ARI:$ptr,
-                                                            !cast<MxRegOp>("MxDRD"#size):$val),
+  def : Pat<(!cast<SDPatternOperator>("atomic_store_"#size) !cast<MxRegOp>("MxDRD"#size):$val, MxCP_ARI:$ptr),
             (!cast<MxInst>("MOV"#size#"jd") !cast<MxMemOp>("MxARI"#size):$ptr,
                                             !cast<MxRegOp>("MxDRD"#size):$val)>;
 }


        


More information about the llvm-commits mailing list