gcc/testsuite/gcc.dg/tree-ssa/pr66726-6.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-phiopt1-details" } */ |
| 3 | |
| 4 | |
| 5 | unsigned char |
| 6 | foo1 (unsigned char *p, int i) |
| 7 | { |
| 8 | if (i < 0) |
| 9 | return 0; |
| 10 | { |
| 11 | int t = i > 255 ? 255 : i; |
| 12 | return t; |
| 13 | } |
| 14 | } |
| 15 | /* testing to see if moving the cast out of the conditional. */ |
| 16 | |
| 17 | /* { dg-final { scan-tree-dump-times "COND_EXPR .*and PHI .*converted to straightline code" 1 "phiopt1" } } */ |