llvm.org GIT mirror llvm / bf42f24
ARM two-operand forms for vhadd and vhsub instructions. rdar://11252521 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154875 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Grosbach 7 years ago
3 changed file(s) with 115 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
69856985 def : NEONInstAlias<"vsli${p}.64 $Vdm, $imm",
69866986 (VSLIv2i64 QPR:$Vdm, QPR:$Vdm, shr_imm64:$imm, pred:$p)>;
69876987
6988 // Two-operand variants for VHSUB.
6989 // Signed.
6990 def : NEONInstAlias<"vhsub${p}.s8 $Vdn, $Vm",
6991 (VHSUBsv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6992 def : NEONInstAlias<"vhsub${p}.s16 $Vdn, $Vm",
6993 (VHSUBsv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6994 def : NEONInstAlias<"vhsub${p}.s32 $Vdn, $Vm",
6995 (VHSUBsv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6996
6997 def : NEONInstAlias<"vhsub${p}.s8 $Vdn, $Vm",
6998 (VHSUBsv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6999 def : NEONInstAlias<"vhsub${p}.s16 $Vdn, $Vm",
7000 (VHSUBsv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7001 def : NEONInstAlias<"vhsub${p}.s32 $Vdn, $Vm",
7002 (VHSUBsv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7003
7004 // Unsigned.
7005 def : NEONInstAlias<"vhsub${p}.u8 $Vdn, $Vm",
7006 (VHSUBuv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7007 def : NEONInstAlias<"vhsub${p}.u16 $Vdn, $Vm",
7008 (VHSUBuv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7009 def : NEONInstAlias<"vhsub${p}.u32 $Vdn, $Vm",
7010 (VHSUBuv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7011
7012 def : NEONInstAlias<"vhsub${p}.u8 $Vdn, $Vm",
7013 (VHSUBuv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7014 def : NEONInstAlias<"vhsub${p}.u16 $Vdn, $Vm",
7015 (VHSUBuv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7016 def : NEONInstAlias<"vhsub${p}.u32 $Vdn, $Vm",
7017 (VHSUBuv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7018
7019
7020 // Two-operand variants for VHADD.
7021 // Signed.
7022 def : NEONInstAlias<"vhadd${p}.s8 $Vdn, $Vm",
7023 (VHADDsv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7024 def : NEONInstAlias<"vhadd${p}.s16 $Vdn, $Vm",
7025 (VHADDsv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7026 def : NEONInstAlias<"vhadd${p}.s32 $Vdn, $Vm",
7027 (VHADDsv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7028
7029 def : NEONInstAlias<"vhadd${p}.s8 $Vdn, $Vm",
7030 (VHADDsv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7031 def : NEONInstAlias<"vhadd${p}.s16 $Vdn, $Vm",
7032 (VHADDsv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7033 def : NEONInstAlias<"vhadd${p}.s32 $Vdn, $Vm",
7034 (VHADDsv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7035
7036 // Unsigned.
7037 def : NEONInstAlias<"vhadd${p}.u8 $Vdn, $Vm",
7038 (VHADDuv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7039 def : NEONInstAlias<"vhadd${p}.u16 $Vdn, $Vm",
7040 (VHADDuv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7041 def : NEONInstAlias<"vhadd${p}.u32 $Vdn, $Vm",
7042 (VHADDuv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7043
7044 def : NEONInstAlias<"vhadd${p}.u8 $Vdn, $Vm",
7045 (VHADDuv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7046 def : NEONInstAlias<"vhadd${p}.u16 $Vdn, $Vm",
7047 (VHADDuv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7048 def : NEONInstAlias<"vhadd${p}.u32 $Vdn, $Vm",
7049 (VHADDuv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
69887050
69897051 // Two-operand variants for VRHADD.
69907052 // Signed.
6363 vhadd.u16 q8, q8, q9
6464 @ CHECK: vhadd.u32 q8, q8, q9 @ encoding: [0xe2,0x00,0x60,0xf3]
6565 vhadd.u32 q8, q8, q9
66
67
68 vhadd.s8 d11, d24
69 vhadd.s16 d12, d23
70 vhadd.s32 d13, d22
71 vhadd.u8 d14, d21
72 vhadd.u16 d15, d20
73 vhadd.u32 d16, d19
74 vhadd.s8 q1, q12
75 vhadd.s16 q2, q11
76 vhadd.s32 q3, q10
77 vhadd.u8 q4, q9
78 vhadd.u16 q5, q8
79 vhadd.u32 q6, q7
80
81 @ CHECK: vhadd.s8 d11, d11, d24 @ encoding: [0x28,0xb0,0x0b,0xf2]
82 @ CHECK: vhadd.s16 d12, d12, d23 @ encoding: [0x27,0xc0,0x1c,0xf2]
83 @ CHECK: vhadd.s32 d13, d13, d22 @ encoding: [0x26,0xd0,0x2d,0xf2]
84 @ CHECK: vhadd.u8 d14, d14, d21 @ encoding: [0x25,0xe0,0x0e,0xf3]
85 @ CHECK: vhadd.u16 d15, d15, d20 @ encoding: [0x24,0xf0,0x1f,0xf3]
86 @ CHECK: vhadd.u32 d16, d16, d19 @ encoding: [0xa3,0x00,0x60,0xf3]
87 @ CHECK: vhadd.s8 q1, q1, q12 @ encoding: [0x68,0x20,0x02,0xf2]
88 @ CHECK: vhadd.s16 q2, q2, q11 @ encoding: [0x66,0x40,0x14,0xf2]
89 @ CHECK: vhadd.s32 q3, q3, q10 @ encoding: [0x64,0x60,0x26,0xf2]
90 @ CHECK: vhadd.u8 q4, q4, q9 @ encoding: [0x62,0x80,0x08,0xf3]
91 @ CHECK: vhadd.u16 q5, q5, q8 @ encoding: [0x60,0xa0,0x1a,0xf3]
92 @ CHECK: vhadd.u32 q6, q6, q7 @ encoding: [0x4e,0xc0,0x2c,0xf3]
6693
6794 vrhadd.s8 d16, d16, d17
6895 vrhadd.s16 d16, d16, d17
131131 vrsubhn.i32 d16, q8, q9
132132 @ CHECK: vrsubhn.i64 d16, q8, q9 @ encoding: [0xa2,0x06,0xe0,0xf3]
133133 vrsubhn.i64 d16, q8, q9
134
135 vhsub.s8 d11, d24
136 vhsub.s16 d12, d23
137 vhsub.s32 d13, d22
138 vhsub.u8 d14, d21
139 vhsub.u16 d15, d20
140 vhsub.u32 d16, d19
141 vhsub.s8 q1, q12
142 vhsub.s16 q2, q11
143 vhsub.s32 q3, q10
144 vhsub.u8 q4, q9
145 vhsub.u16 q5, q8
146 vhsub.u32 q6, q7
147
148 @ CHECK: vhsub.s8 d11, d11, d24 @ encoding: [0x28,0xb2,0x0b,0xf2]
149 @ CHECK: vhsub.s16 d12, d12, d23 @ encoding: [0x27,0xc2,0x1c,0xf2]
150 @ CHECK: vhsub.s32 d13, d13, d22 @ encoding: [0x26,0xd2,0x2d,0xf2]
151 @ CHECK: vhsub.u8 d14, d14, d21 @ encoding: [0x25,0xe2,0x0e,0xf3]
152 @ CHECK: vhsub.u16 d15, d15, d20 @ encoding: [0x24,0xf2,0x1f,0xf3]
153 @ CHECK: vhsub.u32 d16, d16, d19 @ encoding: [0xa3,0x02,0x60,0xf3]
154 @ CHECK: vhsub.s8 q1, q1, q12 @ encoding: [0x68,0x22,0x02,0xf2]
155 @ CHECK: vhsub.s16 q2, q2, q11 @ encoding: [0x66,0x42,0x14,0xf2]
156 @ CHECK: vhsub.s32 q3, q3, q10 @ encoding: [0x64,0x62,0x26,0xf2]
157 @ CHECK: vhsub.u8 q4, q4, q9 @ encoding: [0x62,0x82,0x08,0xf3]
158 @ CHECK: vhsub.u16 q5, q5, q8 @ encoding: [0x60,0xa2,0x1a,0xf3]
159 @ CHECK: vhsub.u32 q6, q6, q7 @ encoding: [0x4e,0xc2,0x2c,0xf3]