gcc/testsuite/gcc.dg/tree-ssa/cunroll-16.c
raw| 1 | /* PR/110991 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -fdump-tree-cunroll-details -fdump-tree-optimized" } */ |
| 4 | |
| 5 | static unsigned char a; |
| 6 | static signed char b; |
| 7 | void foo(void); |
| 8 | int main() { |
| 9 | a = 25; |
| 10 | for (; a > 13; --a) |
| 11 | b = a > 127 ?: a << 3; |
| 12 | if (!b) |
| 13 | foo(); |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-tree-dump "optimized: loop with \[0-9\]\+ iterations completely unrolled" "cunroll" } } */ |
| 17 | /* { dg-final { scan-tree-dump-not "foo" "optimized" } } */ |