diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index 703977463814..22c30b033124 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -3208,6 +3208,7 @@ def : InstAlias<"mtpid $Rx", (MTSPR 48, gprc:$Rx)>, Requires<[IsBookE]>; def : InstAlias<"mfpid $Rx", (MFSPR gprc:$Rx, 48)>, Requires<[IsBookE]>; def : InstAlias<"mftb $Rx", (MFTB gprc:$Rx, 268)>; +def : InstAlias<"mftbl $Rx", (MFTB gprc:$Rx, 268)>; def : InstAlias<"mftbu $Rx", (MFTB gprc:$Rx, 269)>; def : InstAlias<"xnop", (XORI R0, R0, 0)>; diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s b/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s index 16ae65b9ea62..aee65c6fc201 100644 --- a/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s +++ b/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s @@ -106,6 +106,9 @@ # CHECK-BE: mftb 2, 268 # encoding: [0x7c,0x4c,0x42,0xe6] # CHECK-LE: mftb 2, 268 # encoding: [0xe6,0x42,0x4c,0x7c] mftb 2 +# CHECK-BE: mftb 2, 268 # encoding: [0x7c,0x4c,0x42,0xe6] +# CHECK-LE: mftb 2, 268 # encoding: [0xe6,0x42,0x4c,0x7c] + mftbl 2 # CHECK-BE: mftb 2, 269 # encoding: [0x7c,0x4d,0x42,0xe6] # CHECK-LE: mftb 2, 269 # encoding: [0xe6,0x42,0x4d,0x7c] mftbu 2