From 13034b43ef4c08b2ae46bf5d5db224fb44eeaf2b Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Fri, 1 Nov 2013 17:13:44 +0000 Subject: [PATCH] [AArch64] Simplify a few of the instruction patterns. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193867 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64InstrNEON.td | 169 +++++++++---------------- 1 file changed, 60 insertions(+), 109 deletions(-) diff --git a/lib/Target/AArch64/AArch64InstrNEON.td b/lib/Target/AArch64/AArch64InstrNEON.td index d96df10d193..4d8adb898ff 100644 --- a/lib/Target/AArch64/AArch64InstrNEON.td +++ b/lib/Target/AArch64/AArch64InstrNEON.td @@ -3090,68 +3090,40 @@ def ST1_4V_1D : NeonI_STVList<0, 0b0010, 0b11, VQuad1D_operand, "st1">; // Scalar Three Same +class NeonI_Scalar3Same_size size, bits<5> opcode, string asmop, + RegisterClass FPRC> + : NeonI_Scalar3Same; + class NeonI_Scalar3Same_D_size opcode, string asmop> - : NeonI_Scalar3Same; + : NeonI_Scalar3Same_size; -multiclass NeonI_Scalar3Same_HS_sizes opcode, - string asmop, bit Commutable = 0> { +multiclass NeonI_Scalar3Same_HS_sizes opcode, string asmop, + bit Commutable = 0> { let isCommutable = Commutable in { - def hhh : NeonI_Scalar3Same; - def sss : NeonI_Scalar3Same; + def hhh : NeonI_Scalar3Same_size; + def sss : NeonI_Scalar3Same_size; } } multiclass NeonI_Scalar3Same_SD_sizes opcode, string asmop, bit Commutable = 0> { let isCommutable = Commutable in { - def sss : NeonI_Scalar3Same; - def ddd : NeonI_Scalar3Same; + def sss : NeonI_Scalar3Same_size; + def ddd : NeonI_Scalar3Same_size; } } multiclass NeonI_Scalar3Same_BHSD_sizes opcode, string asmop, bit Commutable = 0> { let isCommutable = Commutable in { - def bbb : NeonI_Scalar3Same; - def hhh : NeonI_Scalar3Same; - def sss : NeonI_Scalar3Same; - def ddd : NeonI_Scalar3Same; + def bbb : NeonI_Scalar3Same_size; + def hhh : NeonI_Scalar3Same_size; + def sss : NeonI_Scalar3Same_size; + def ddd : NeonI_Scalar3Same_size; } } @@ -3211,17 +3183,17 @@ multiclass Neon_Scalar3Same_cmp_SD_size_patterns size, bits<4> opcode, string asmop, + RegisterClass FPRCD, RegisterClass FPRCS> + : NeonI_Scalar3Diff; + multiclass NeonI_Scalar3Diff_HS_size opcode, string asmop> { - def shh : NeonI_Scalar3Diff; - def dss : NeonI_Scalar3Diff; + def shh : NeonI_Scalar3Diff_size; + def dss : NeonI_Scalar3Diff_size; } multiclass NeonI_Scalar3Diff_ml_HS_size opcode, string asmop> { @@ -3259,77 +3231,56 @@ multiclass Neon_Scalar3Diff_ml_HS_size_patterns size, bits<5> opcode, string asmop, + RegisterClass FPRCD, RegisterClass FPRCS> + : NeonI_Scalar2SameMisc; + multiclass NeonI_Scalar2SameMisc_SD_size opcode, string asmop> { - def ss : NeonI_Scalar2SameMisc; - def dd : NeonI_Scalar2SameMisc; + def ss : NeonI_Scalar2SameMisc_size; + def dd : NeonI_Scalar2SameMisc_size; } multiclass NeonI_Scalar2SameMisc_D_size opcode, string asmop> { - def dd: NeonI_Scalar2SameMisc; + def dd: NeonI_Scalar2SameMisc_size; } multiclass NeonI_Scalar2SameMisc_BHSD_size opcode, string asmop> : NeonI_Scalar2SameMisc_D_size { - def bb : NeonI_Scalar2SameMisc; - def hh : NeonI_Scalar2SameMisc; - def ss : NeonI_Scalar2SameMisc; + def bb : NeonI_Scalar2SameMisc_size; + def hh : NeonI_Scalar2SameMisc_size; + def ss : NeonI_Scalar2SameMisc_size; } multiclass NeonI_Scalar2SameMisc_narrow_HSD_size opcode, string asmop> { - def bh : NeonI_Scalar2SameMisc; - def hs : NeonI_Scalar2SameMisc; - def sd : NeonI_Scalar2SameMisc; + def bh : NeonI_Scalar2SameMisc_size; + def hs : NeonI_Scalar2SameMisc_size; + def sd : NeonI_Scalar2SameMisc_size; } +class NeonI_Scalar2SameMisc_accum_size size, bits<5> opcode, + string asmop, RegisterClass FPRC> + : NeonI_Scalar2SameMisc; + multiclass NeonI_Scalar2SameMisc_accum_BHSD_size opcode, string asmop> { let Constraints = "$Src = $Rd" in { - def bb : NeonI_Scalar2SameMisc; - def hh : NeonI_Scalar2SameMisc; - def ss : NeonI_Scalar2SameMisc; - def dd: NeonI_Scalar2SameMisc; + def bb : NeonI_Scalar2SameMisc_accum_size; + def hh : NeonI_Scalar2SameMisc_accum_size; + def ss : NeonI_Scalar2SameMisc_accum_size; + def dd : NeonI_Scalar2SameMisc_accum_size; } } -- 2.34.1