gcc/testsuite/gcc.dg/vect/pr110838.c
raw| 1 | #include "tree-vect.h" |
| 2 | |
| 3 | short a[32], b[32]; |
| 4 | |
| 5 | void __attribute__((noipa)) foo () |
| 6 | { |
| 7 | for (int i = 0; i < 32; ++i) |
| 8 | a[i] = b[i] >> 16; |
| 9 | } |
| 10 | |
| 11 | void __attribute__((noipa)) bar (int n) |
| 12 | { |
| 13 | int np = n & 31; |
| 14 | for (int i = 0; i < 32; ++i) |
| 15 | a[i] = b[i] >> np; |
| 16 | } |
| 17 | |
| 18 | int main () |
| 19 | { |
| 20 | check_vect (); |
| 21 | b[0] = -8; |
| 22 | foo (); |
| 23 | if (a[0] != -1) |
| 24 | abort (); |
| 25 | bar (16); |
| 26 | if (a[0] != -1) |
| 27 | abort (); |
| 28 | return 0; |
| 29 | } |