> -----Original Message----- > From: Tamar Christina <tamar.christ...@arm.com> > Sent: 25 September 2020 15:31 > To: gcc-patches@gcc.gnu.org > Cc: nd <n...@arm.com>; Ramana Radhakrishnan > <ramana.radhakrish...@arm.com>; Richard Earnshaw > <richard.earns...@arm.com>; ni...@redhat.com; Kyrylo Tkachov > <kyrylo.tkac...@arm.com> > Subject: [PATCH v2 14/16]Arm: Add NEON RTL patterns for Complex Addition, > Multiply and FMA. > > Hi All, > > This adds implementation for the optabs for complex additions. With this > the > following C code: > > void f90 (float complex a[restrict N], float complex b[restrict N], > float complex c[restrict N]) > { > for (int i=0; i < N; i++) > c[i] = a[i] + (b[i] * I); > } > > generates > > f90: > add r3, r2, #1600 > .L2: > vld1.32 {q8}, [r0]! > vld1.32 {q9}, [r1]! > vcadd.f32 q8, q8, q9, #90 > vst1.32 {q8}, [r2]! > cmp r3, r2 > bne .L2 > bx lr > > > instead of > > f90: > add r3, r2, #1600 > .L2: > vld2.32 {d24-d27}, [r0]! > vld2.32 {d20-d23}, [r1]! > vsub.f32 q8, q12, q11 > vadd.f32 q9, q13, q10 > vst2.32 {d16-d19}, [r2]! > cmp r3, r2 > bne .L2 > bx lr > > > Bootstrapped Regtested on arm-none-linux-gnueabihf and no issues. > > Ok for master? >
Ok. Thanks, Kyrill > Thanks, > Tamar > > gcc/ChangeLog: > > * config/arm/iterators.md (rot): Add UNSPEC_VCMLS, > UNSPEC_VCMUL and > UNSPEC_VCMUL180. > (rot_op, rotsplit1, rotsplit2, fcmac1, VCMLA_OP, VCMUL_OP): New. > * config/arm/neon.md (cadd<rot><mode>3, > cml<fcmac1><rot_op><mode>4, > cmul<rot_op><mode>3): New. > * config/arm/unspecs.md (UNSPEC_VCMUL, UNSPEC_VCMUL180, > UNSPEC_VCMLS, > UNSPEC_VCMLS180): New. > > --