diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr119103.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr119103.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr119103.c b/gcc/testsuite/gcc.target/i386/pr119103.c new file mode 100644 index 0000000..57210dc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr119103.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mavx2" } */ + +void lshift(unsigned short *x, unsigned char amount) +{ + if (amount > 15) + __builtin_unreachable(); + + for (int i = 0; i < 16; i++) + x[i] <<= amount; +} + +/* { dg-final { scan-assembler "vpsllw" } } */ |