gcc/testsuite/gcc.target/i386/ssse3-truncsfbf.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-mssse3 -mno-avx512bf16 -mno-avxneconvert -O2 -ffast-math" } */ |
| 3 | /* { dg-final { scan-assembler-times {(?n)pshufb} 2 { target { ! ia32 } } } } */ |
| 4 | |
| 5 | typedef float v2sf __attribute__((vector_size(8))); |
| 6 | typedef __bf16 v2bf __attribute__((vector_size(4))); |
| 7 | |
| 8 | v2bf |
| 9 | foo (v2sf b, v2sf a) |
| 10 | { |
| 11 | return __builtin_convertvector (a, v2bf); |
| 12 | } |
| 13 | |
| 14 | |
| 15 | v2bf |
| 16 | foo_mem (v2sf* a) |
| 17 | { |
| 18 | return __builtin_convertvector (*a, v2bf); |
| 19 | } |
| 20 |