[AArch64, Patch] Generate MLA when multiply + add vector by scalar
(On behalf of jackson.woodruff@arm.com) This merges vector multiplies and adds into a single mla instruction when the multiplication is done by a scalar. typedef int __attribute__((vector_size(16))) vec; vec mla1(vec v0, vec v1, int v2) { return v0 + v1 * c; } Now generates: mla1: fmov s2, w0 mla v0.4s, v1.4s, v2.s[0] This is also done for the identical case for a multiply followed by a subtract of vectors with an integer operand on the multiply. gcc/ 2017-07-24 Jackson Woodruff <jackson.woodruff@arm.com> * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New. (aarch64_mls_elt_merge<mode>): Likewise. gcc/testsuite/ 2017-07-24 Jackson Woodruff <jackson.woodruff@arm.com> * gcc.target/aarch64/simd/vmla_elem_1.c: New. From-SVN: r250475
Showing
Please
register
or
sign in
to comment