[llvm-commits] [llvm] r144587 - in /llvm/trunk: lib/Target/ARM/ARMInstrFormats.td lib/Target/ARM/ARMInstrNEON.td test/MC/ARM/neon-bitwise-encoding.s
Jim Grosbach
grosbach at apple.com
Mon Nov 14 15:11:19 PST 2011
Author: grosbach
Date: Mon Nov 14 17:11:19 2011
New Revision: 144587
URL: http://llvm.org/viewvc/llvm-project?rev=144587&view=rev
Log:
ARM parsing optional datatype suffix for VAND/VEOR/VORR instructions.
rdar://10435076
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
llvm/trunk/test/MC/ARM/neon-bitwise-encoding.s
Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=144587&r1=144586&r2=144587&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Mon Nov 14 17:11:19 2011
@@ -1995,6 +1995,20 @@
// VFP/NEON Instruction aliases for type suffices.
class VFPDataTypeInstAlias<string opc, string dt, string asm, dag Result> :
InstAlias<!strconcat(opc, dt, asm), Result>;
+multiclass VFPDT8InstAlias<string opc, string asm, dag Result> {
+ def _8 : VFPDataTypeInstAlias<opc, ".8", asm, Result>;
+ def I8 : VFPDataTypeInstAlias<opc, ".i8", asm, Result>;
+ def S8 : VFPDataTypeInstAlias<opc, ".s8", asm, Result>;
+ def U8 : VFPDataTypeInstAlias<opc, ".u8", asm, Result>;
+ def F8 : VFPDataTypeInstAlias<opc, ".p8", asm, Result>;
+}
+multiclass VFPDT16InstAlias<string opc, string asm, dag Result> {
+ def _16 : VFPDataTypeInstAlias<opc, ".16", asm, Result>;
+ def I16 : VFPDataTypeInstAlias<opc, ".i16", asm, Result>;
+ def S16 : VFPDataTypeInstAlias<opc, ".s16", asm, Result>;
+ def U16 : VFPDataTypeInstAlias<opc, ".u16", asm, Result>;
+ def F16 : VFPDataTypeInstAlias<opc, ".p16", asm, Result>;
+}
multiclass VFPDT32InstAlias<string opc, string asm, dag Result> {
def _32 : VFPDataTypeInstAlias<opc, ".32", asm, Result>;
def I32 : VFPDataTypeInstAlias<opc, ".i32", asm, Result>;
@@ -2011,4 +2025,9 @@
def F64 : VFPDataTypeInstAlias<opc, ".f64", asm, Result>;
def D : VFPDataTypeInstAlias<opc, ".d", asm, Result>;
}
-
+multiclass VFPDTAnyInstAlias<string opc, string asm, dag Result> {
+ defm : VFPDT8InstAlias<opc, asm, Result>;
+ defm : VFPDT16InstAlias<opc, asm, Result>;
+ defm : VFPDT32InstAlias<opc, asm, Result>;
+ defm : VFPDT64InstAlias<opc, asm, Result>;
+}
Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=144587&r1=144586&r2=144587&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Nov 14 17:11:19 2011
@@ -5179,3 +5179,21 @@
def : Pat<(v2f64 (bitconvert (v8i16 QPR:$src))), (v2f64 QPR:$src)>;
def : Pat<(v2f64 (bitconvert (v16i8 QPR:$src))), (v2f64 QPR:$src)>;
def : Pat<(v2f64 (bitconvert (v4f32 QPR:$src))), (v2f64 QPR:$src)>;
+
+
+//===----------------------------------------------------------------------===//
+// Assembler aliases
+//
+
+defm : VFPDTAnyInstAlias<"vand${p}", "$Vd, $Vn, $Vm",
+ (VANDd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
+defm : VFPDTAnyInstAlias<"vand${p}", "$Vd, $Vn, $Vm",
+ (VANDq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
+defm : VFPDTAnyInstAlias<"veor${p}", "$Vd, $Vn, $Vm",
+ (VEORd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
+defm : VFPDTAnyInstAlias<"veor${p}", "$Vd, $Vn, $Vm",
+ (VEORq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
+defm : VFPDTAnyInstAlias<"vorr${p}", "$Vd, $Vn, $Vm",
+ (VORRd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
+defm : VFPDTAnyInstAlias<"vorr${p}", "$Vd, $Vn, $Vm",
+ (VORRq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
Modified: llvm/trunk/test/MC/ARM/neon-bitwise-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/neon-bitwise-encoding.s?rev=144587&r1=144586&r2=144587&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/neon-bitwise-encoding.s (original)
+++ llvm/trunk/test/MC/ARM/neon-bitwise-encoding.s Mon Nov 14 17:11:19 2011
@@ -53,3 +53,180 @@
@ CHECK: vbsl d18, d17, d16 @ encoding: [0xb0,0x21,0x51,0xf3]
@ CHECK: vbsl q8, q10, q9 @ encoding: [0xf2,0x01,0x54,0xf3]
+
+
+@ Size suffices are optional.
+ veor q4, q7, q3
+ veor.8 q4, q7, q3
+ veor.16 q4, q7, q3
+ veor.32 q4, q7, q3
+ veor.64 q4, q7, q3
+
+ veor.i8 q4, q7, q3
+ veor.i16 q4, q7, q3
+ veor.i32 q4, q7, q3
+ veor.i64 q4, q7, q3
+
+ veor.s8 q4, q7, q3
+ veor.s16 q4, q7, q3
+ veor.s32 q4, q7, q3
+ veor.s64 q4, q7, q3
+
+ veor.u8 q4, q7, q3
+ veor.u16 q4, q7, q3
+ veor.u32 q4, q7, q3
+ veor.u64 q4, q7, q3
+
+ veor.p8 q4, q7, q3
+ veor.p16 q4, q7, q3
+ veor.f32 q4, q7, q3
+ veor.f64 q4, q7, q3
+
+ veor.f q4, q7, q3
+ veor.d q4, q7, q3
+
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+@ CHECK: veor q4, q7, q3 @ encoding: [0x56,0x81,0x0e,0xf3]
+
+
+ vand d4, d7, d3
+ vand.8 d4, d7, d3
+ vand.16 d4, d7, d3
+ vand.32 d4, d7, d3
+ vand.64 d4, d7, d3
+
+ vand.i8 d4, d7, d3
+ vand.i16 d4, d7, d3
+ vand.i32 d4, d7, d3
+ vand.i64 d4, d7, d3
+
+ vand.s8 d4, d7, d3
+ vand.s16 d4, d7, d3
+ vand.s32 d4, d7, d3
+ vand.s64 d4, d7, d3
+
+ vand.u8 d4, d7, d3
+ vand.u16 d4, d7, d3
+ vand.u32 d4, d7, d3
+ vand.u64 d4, d7, d3
+
+ vand.p8 d4, d7, d3
+ vand.p16 d4, d7, d3
+ vand.f32 d4, d7, d3
+ vand.f64 d4, d7, d3
+
+ vand.f d4, d7, d3
+ vand.d d4, d7, d3
+
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+@ CHECK: vand d4, d7, d3 @ encoding: [0x13,0x41,0x07,0xf2]
+
+ vorr d4, d7, d3
+ vorr.8 d4, d7, d3
+ vorr.16 d4, d7, d3
+ vorr.32 d4, d7, d3
+ vorr.64 d4, d7, d3
+
+ vorr.i8 d4, d7, d3
+ vorr.i16 d4, d7, d3
+ vorr.i32 d4, d7, d3
+ vorr.i64 d4, d7, d3
+
+ vorr.s8 d4, d7, d3
+ vorr.s16 d4, d7, d3
+ vorr.s32 q4, q7, q3
+ vorr.s64 q4, q7, q3
+
+ vorr.u8 q4, q7, q3
+ vorr.u16 q4, q7, q3
+ vorr.u32 q4, q7, q3
+ vorr.u64 q4, q7, q3
+
+ vorr.p8 q4, q7, q3
+ vorr.p16 q4, q7, q3
+ vorr.f32 q4, q7, q3
+ vorr.f64 q4, q7, q3
+
+ vorr.f q4, q7, q3
+ vorr.d q4, q7, q3
+
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+@ CHECK: vorr d4, d7, d3 @ encoding: [0x13,0x41,0x27,0xf2]
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
+@ CHECK: vorr q4, q7, q3 @ encoding: [0x56,0x81,0x2e,0xf2]
More information about the llvm-commits
mailing list