Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / signbit-2.c
blobb609f67dc9f8a949b86f0ec84144db834b9d531a
1 /* { dg-do assemble } */
2 /* { dg-options "-O3 --save-temps -fdump-tree-optimized" } */
4 /* This test does not work when the truth type does not match vector type. */
5 /* { dg-additional-options "-mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */
6 /* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */
8 #include <stdint.h>
10 void fun1(int32_t *x, int n)
12 for (int i = 0; i < (n & -16); i++)
13 x[i] = (-x[i]) >> 31;
16 void fun2(int32_t *x, int n)
18 for (int i = 0; i < (n & -16); i++)
19 x[i] = (-x[i]) >> 30;
22 /* { dg-final { scan-tree-dump {\s+>\s+\{ 0(, 0)+ \}} optimized { target vect_int } } } */
23 /* { dg-final { scan-tree-dump {\s+>\s+0} optimized { target { ! vect_int } } } } */
24 /* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized } } */