diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index 5c2c59f21bed..d535debc223f 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -2286,6 +2286,7 @@ class PPCAsmPseudo def : InstAlias<"sc", (SC 0)>; def : InstAlias<"sync", (SYNC 0)>; +def : InstAlias<"msync", (SYNC 0)>; def : InstAlias<"lwsync", (SYNC 1)>; def : InstAlias<"ptesync", (SYNC 2)>; diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s b/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s index b6c2e621d42c..34ed77aa7f68 100644 --- a/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s +++ b/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s @@ -57,6 +57,8 @@ # CHECK: sync 0 # encoding: [0x7c,0x00,0x04,0xac] sync +# CHECK: sync 0 # encoding: [0x7c,0x00,0x04,0xac] + msync # CHECK: sync 1 # encoding: [0x7c,0x20,0x04,0xac] lwsync # CHECK: sync 2 # encoding: [0x7c,0x40,0x04,0xac]