gcc/testsuite/gcc.target/i386/pr116940.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-O2 -mavx512vl" } */ |
| 3 | /* { dg-require-effective-target avx512vl } */ |
| 4 | |
| 5 | #define AVX512VL |
| 6 | #include "avx512f-helper.h" |
| 7 | |
| 8 | typedef __attribute__((__vector_size__ (16))) unsigned V; |
| 9 | |
| 10 | short s; |
| 11 | |
| 12 | V |
| 13 | foo () |
| 14 | { |
| 15 | return ~(-(V){ 0, 0, 0, 1 } <= s); |
| 16 | } |
| 17 | |
| 18 | void |
| 19 | test_128 () |
| 20 | { |
| 21 | V x = foo (); |
| 22 | if (x[0] != 0 || x[1] != 0 || x[2] != 0 || x[3] != 0xffffffff) |
| 23 | __builtin_abort(); |
| 24 | } |
| 25 | |
| 26 | void |
| 27 | test_256 () |
| 28 | {} |