|
215 | 215 | && ARM_HAVE_<MODE>_ARITH)) && !BYTES_BIG_ENDIAN"
|
216 | 216 | )
|
217 | 217 |
|
| 218 | +;; The complex mul operations always need to expand to two instructions. |
| 219 | +;; The first operation does half the computation and the second does the |
| 220 | +;; remainder. Because of this, expand early. |
| 221 | +(define_expand "cmul<conj_op><mode>3" |
| 222 | + [(set (match_operand:VQ_HSF 0 "register_operand") |
| 223 | + (unspec:VQ_HSF [(match_operand:VQ_HSF 1 "register_operand") |
| 224 | + (match_operand:VQ_HSF 2 "register_operand")] |
| 225 | + VCMUL_OP))] |
| 226 | + "(TARGET_COMPLEX || (TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT)) |
| 227 | + && !BYTES_BIG_ENDIAN" |
| 228 | +{ |
| 229 | + rtx res1 = gen_reg_rtx (<MODE>mode); |
| 230 | + if (TARGET_COMPLEX) |
| 231 | + { |
| 232 | + rtx tmp = force_reg (<MODE>mode, CONST0_RTX (<MODE>mode)); |
| 233 | + emit_insn (gen_arm_vcmla<rotsplit1><mode> (res1, tmp, |
| 234 | + operands[2], operands[1])); |
| 235 | + } |
| 236 | + else |
| 237 | + emit_insn (gen_arm_vcmla<rotsplit1><mode> (res1, CONST0_RTX (<MODE>mode), |
| 238 | + operands[2], operands[1])); |
| 239 | + |
| 240 | + emit_insn (gen_arm_vcmla<rotsplit2><mode> (operands[0], res1, |
| 241 | + operands[2], operands[1])); |
| 242 | + DONE; |
| 243 | +}) |
| 244 | + |
| 245 | +(define_expand "arm_vcmla<rot><mode>" |
| 246 | + [(set (match_operand:VF 0 "register_operand") |
| 247 | + (plus:VF (match_operand:VF 1 "register_operand") |
| 248 | + (unspec:VF [(match_operand:VF 2 "register_operand") |
| 249 | + (match_operand:VF 3 "register_operand")] |
| 250 | + VCMLA)))] |
| 251 | + "(TARGET_COMPLEX || (TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT |
| 252 | + && ARM_HAVE_<MODE>_ARITH)) && !BYTES_BIG_ENDIAN" |
| 253 | +) |
| 254 | + |
| 255 | +;; The complex mla/mls operations always need to expand to two instructions. |
| 256 | +;; The first operation does half the computation and the second does the |
| 257 | +;; remainder. Because of this, expand early. |
| 258 | +(define_expand "cml<fcmac1><conj_op><mode>4" |
| 259 | + [(set (match_operand:VF 0 "register_operand") |
| 260 | + (plus:VF (match_operand:VF 1 "register_operand") |
| 261 | + (unspec:VF [(match_operand:VF 2 "register_operand") |
| 262 | + (match_operand:VF 3 "register_operand")] |
| 263 | + VCMLA_OP)))] |
| 264 | + "(TARGET_COMPLEX || (TARGET_HAVE_MVE && TARGET_HAVE_MVE_FLOAT |
| 265 | + && ARM_HAVE_<MODE>_ARITH)) && !BYTES_BIG_ENDIAN" |
| 266 | +{ |
| 267 | + rtx tmp = gen_reg_rtx (<MODE>mode); |
| 268 | + emit_insn (gen_arm_vcmla<rotsplit1><mode> (tmp, operands[1], |
| 269 | + operands[3], operands[2])); |
| 270 | + emit_insn (gen_arm_vcmla<rotsplit2><mode> (operands[0], tmp, |
| 271 | + operands[3], operands[2])); |
| 272 | + DONE; |
| 273 | +}) |
| 274 | + |
218 | 275 | (define_expand "movmisalign<mode>"
|
219 | 276 | [(set (match_operand:VDQX 0 "neon_perm_struct_or_reg_operand")
|
220 | 277 | (unspec:VDQX [(match_operand:VDQX 1 "neon_perm_struct_or_reg_operand")]
|
|
0 commit comments