[llvm] r242164 - AArch64: add rev64 alias for 64-bit rev instruction.

Tim Northover tnorthover at apple.com
Tue Jul 14 10:07:29 PDT 2015


Author: tnorthover
Date: Tue Jul 14 12:07:29 2015
New Revision: 242164

URL: http://llvm.org/viewvc/llvm-project?rev=242164&view=rev
Log:
AArch64: add rev64 alias for 64-bit rev instruction.

It could be useful to assembly programmers and makes the permitted variants a
little more uniform.

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td
    llvm/trunk/test/MC/AArch64/basic-a64-instructions.s

Modified: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td?rev=242164&r1=242163&r2=242164&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td Tue Jul 14 12:07:29 2015
@@ -894,6 +894,8 @@ def REVXr   : OneXRegData<0b011, "rev",
 def REV32Xr : OneXRegData<0b010, "rev32",
                                  UnOpFrag<(rotr (bswap node:$LHS), (i64 32))>>;
 
+def : InstAlias<"rev64 $Rd, $Rn", (REVXr GPR64:$Rd, GPR64:$Rn), 0>;
+
 // The bswap commutes with the rotr so we want a pattern for both possible
 // orders.
 def : Pat<(bswap (rotr GPR32:$Rn, (i64 16))), (REV16Wr GPR32:$Rn)>;

Modified: llvm/trunk/test/MC/AArch64/basic-a64-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/basic-a64-instructions.s?rev=242164&r1=242163&r2=242164&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/basic-a64-instructions.s (original)
+++ llvm/trunk/test/MC/AArch64/basic-a64-instructions.s Tue Jul 14 12:07:29 2015
@@ -1489,6 +1489,9 @@ _func:
 // CHECK: clz	w24, wzr                     // encoding: [0xf8,0x13,0xc0,0x5a]
 // CHECK: rev	x22, xzr                     // encoding: [0xf6,0x0f,0xc0,0xda]
 
+	rev64	x13, x12
+// CHECK: rev	x13, x12                     // encoding: [0x8d,0x0d,0xc0,0xda]
+
 //------------------------------------------------------------------------------
 // Data-processing (2 source)
 //------------------------------------------------------------------------------





More information about the llvm-commits mailing list