gcc/testsuite/gcc.dg/vect/pr71854.c
raw| 1 | /* PR tree-optimization/71854 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-additional-options "-O3 -ftree-loop-if-convert" } */ |
| 4 | |
| 5 | char a, f = 1; |
| 6 | int b, c, e[8]; |
| 7 | short d; |
| 8 | |
| 9 | short |
| 10 | foo (short x) |
| 11 | { |
| 12 | return x >= 2 || x >> c ? x : x << c; |
| 13 | } |
| 14 | |
| 15 | int |
| 16 | main () |
| 17 | { |
| 18 | while (f) |
| 19 | for (d = 0; d <= 7; d++) |
| 20 | { |
| 21 | f = 7 >> b ? a : a << b; |
| 22 | e[d] = foo (f); |
| 23 | } |
| 24 | return 0; |
| 25 | } |