gcc/testsuite/gcc.c-torture/compile/pr99225.c
raw| 1 | /* PR tree-optimization/99225 */ |
| 2 | |
| 3 | typedef int V __attribute__((vector_size (4 * sizeof (int)))); |
| 4 | |
| 5 | void |
| 6 | foo (V *x) |
| 7 | { |
| 8 | x[2] = (x[0] & (1 << x[1])) != 0; |
| 9 | } |
| 10 | |
| 11 | void |
| 12 | bar (V *x) |
| 13 | { |
| 14 | x[2] = ((1 << x[1]) & x[0]) != 0; |
| 15 | } |
| 16 | |
| 17 | void |
| 18 | baz (V *x) |
| 19 | { |
| 20 | V a = 1 << x[1]; |
| 21 | V b = a & x[0]; |
| 22 | x[2] = b != 0; |
| 23 | } |
| 24 | |
| 25 | void |
| 26 | qux (V *x) |
| 27 | { |
| 28 | V a = 1 << x[1]; |
| 29 | V b = x[0] & a; |
| 30 | x[2] = b != 0; |
| 31 | } |