gcc/testsuite/gcc.dg/vect/bb-slp-71.c
raw| 1 | #include "tree-vect.h" |
| 2 | |
| 3 | int a[4], b[4]; |
| 4 | |
| 5 | void __attribute__((noipa)) |
| 6 | foo(int x, int y) |
| 7 | { |
| 8 | int tem0 = x + 1; |
| 9 | int tem1 = y + 2; |
| 10 | int tem2 = x + 3; |
| 11 | int tem3 = y + 4; |
| 12 | a[0] = tem0 + b[1]; |
| 13 | a[1] = tem1 + b[0]; |
| 14 | a[2] = tem2 + b[2]; |
| 15 | a[3] = tem3 + b[3]; |
| 16 | } |
| 17 | |
| 18 | int main() |
| 19 | { |
| 20 | check_vect (); |
| 21 | |
| 22 | b[0] = 10; |
| 23 | b[1] = 14; |
| 24 | b[2] = 18; |
| 25 | b[3] = 22; |
| 26 | foo (-1, -3); |
| 27 | if (a[0] != 14 || a[1] != 9 || a[2] != 20 || a[3] != 23) |
| 28 | __builtin_abort (); |
| 29 | return 0; |
| 30 | } |