https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82582
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For AARCH64 the correct thing is able to be produced: foo32: sub w2, w2, w2, lsl 2 ; w2 = z - z<<2; (rather -z*3) neg w0, w0, lsl 1 ; w0 = x * -2 madd w0, w0, w1, w2 ; res = w0 * y + w2 ret