libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr98560-1.c
blob2583fc48f8a892d88113530ad240c902641089fb
1 /* { dg-do compile } */
2 /* { dg-additional-options "-O3 -fno-tree-vrp -fno-tree-fre -fno-tree-pre -fno-code-hoisting -fvect-cost-model=dynamic" } */
3 /* { dg-additional-options "-msve-vector-bits=128" { target aarch64_sve } } */
5 #include <stdint.h>
7 void
8 f (uint16_t *restrict dst, uint32_t *restrict src1, float *restrict src2)
10 int i = 0;
11 for (int j = 0; j < 4; ++j)
13 uint16_t tmp = src1[i] >> 1;
14 dst[i] = (uint16_t) (src2[i] < 0 && i < 4 ? tmp : 1);
15 i += 1;