Skip to content

Commit

Permalink
[M68k] Swap operands of atomic_store after D123143
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Sep 10, 2023
1 parent 61c44f1 commit 0649594
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/Target/M68k/M68kInstrAtomics.td
Original file line number Diff line number Diff line change
Expand Up @@ -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)>;
}
Expand Down

0 comments on commit 0649594

Please sign in to comment.