1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize -fno-common -msse2" } */
4 unsigned short b
[1024] = { 0 };
11 for (i
= 0; i
< 1024; i
++)
12 a
[i
] = (b
[i
] + 7) / 15;
19 for (i
= 0; i
< 1024; i
++)
20 a
[i
] = (b
[i
] + 7) % 15;
27 for (i
= 0; i
< 1024; i
++)
28 a
[i
] = (b
[i
] - 66000) / 15;
35 for (i
= 0; i
< 1024; i
++)
36 a
[i
] = (b
[i
] - 66000) % 15;
39 /* In f1 and f2, VRP can prove the first operand of division or modulo
40 is always non-negative, so there is no need to do >> 31 shift
41 etc. to check if it is. And in f3 and f4, VRP can prove it is always
43 /* { dg-final { scan-assembler-not "psrad\[^\n\r\]*\\\$31" } } */