https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119187
--- Comment #15 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
unrolling works too
ok, unrolling works too
```
.L5:
ldr q29, [x1, x4]
ldr q31, [x0, x4]
ldr q0, [x9, x4]
ldr q30, [x8, x4]
cmhi v31.16b, v31.16b, v29.16b
cmhi v30.16b, v30.16b, v0.16b
str q31, [x2, x4]
str q30, [x7, x4]
add x4, x4, 32
cmp x10, x4
bne .L5
```
from
```
#include <arm_neon.h>
void foo (uint8_t *a, uint8_t *b, uint8_t *c, int n)
{
#pragma GCC unroll 32
for (int i = 0; i < n; i+=8, a+=8, b+=8, c+=8)
{
uint8x8_t av1 = vld1_u8 (a);
uint8x8_t bv1 = vld1_u8 (b);
vst1_u8 (c, vcgt_u8 (av1, bv1));
}
}
```
so that's good.
BB SLP works too
#include <arm_neon.h>
void foo (uint8_t *a, uint8_t *b, uint8_t *c, int n)
{
uint8x8_t av1 = vld1_u8 (a);
uint8x8_t av2 = vld1_u8 (a+8);
uint8x8_t bv1 = vld1_u8 (b);
uint8x8_t bv2 = vld1_u8 (b+8);
vst1_u8 (c, vadd_u8 (av1, bv1));
vst1_u8 (c+8, vadd_u8 (av2, bv2));
}
turns into
foo:
ldr q31, [x0]
ldr q30, [x1]
add v30.16b, v31.16b, v30.16b
str q30, [x2]
ret
it can't do SVE yet without Chris's BB VLA SLP support.