[Bug target/51509] Inefficient neon intrinsic code sequence
linux at carewolf dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 26 15:24:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51509
Allan Jensen <linux at carewolf dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |linux at carewolf dot com
--- Comment #6 from Allan Jensen <linux at carewolf dot com> ---
I have run into a similar problem with vld3 and vst4.
uint8x16x3_t tmp = vld3q_u8(src);
vst4q_u8((uint8_t *)dst, {tmp.val[2], tmp.val[1], tmp.val[0], fullVector});
produces:
70: 4cdf4061 ld3 {v1.16b-v3.16b}, [x3], #48
74: 4e083c04 mov x4, v0.d[0]
78: 4e183c05 mov x5, v0.d[1]
7c: 6f000400 mvni v0.4s, #0x0
80: 4e083c4a mov x10, v2.d[0]
84: 4e183c4b mov x11, v2.d[1]
88: aa0403e2 mov x2, x4
8c: aa0503e1 mov x1, x5
90: 4e083c24 mov x4, v1.d[0]
94: 4e183c25 mov x5, v1.d[1]
98: a90007e2 stp x2, x1, [sp]
9c: 3d800fe0 str q0, [sp,#48]
a0: a9012fea stp x10, x11, [sp,#16]
a4: aa0403e6 mov x6, x4
a8: a90217e6 stp x6, x5, [sp,#32]
ac: 4c4023e0 ld1 {v0.16b-v3.16b}, [sp]
b0: 4c9f0000 st4 {v0.16b-v3.16b}, [x0], #64
But if I add -fno-split-wide-types it compiles to:
68: 4cdf4064 ld3 {v4.16b-v6.16b}, [x3], #48
6c: 4f000400 movi v0.4s, #0x0
70: 6f000403 mvni v3.4s, #0x0
74: 4ea51ca1 mov v1.16b, v5.16b
78: 4ea41c82 mov v2.16b, v4.16b
7c: 4c9f0000 st4 {v0.16b-v3.16b}, [x0], #64
This happens with both 4.9 and 5.1 that I have tried.
More information about the Gcc-bugs
mailing list