* tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr21001.c
blob719360a015f9041ef61225870beaa0271e05bfdc
1 /* PR tree-optimization/21001
2 VRP did not insert ASSERT_EXPRs when the variable tested in a
3 COND_EXPR is a single-use variable. By propagating the definition
4 of the single-use variable into the COND_EXPR, we can get useful
5 range information out of the conditional. */
7 /* { dg-do compile } */
8 /* { dg-options "-O2 -fno-tree-dominator-opts -fno-tree-fre -fdisable-tree-evrp -fdump-tree-vrp1-details" } */
10 int
11 foo (int a)
13 int b = a != 0;
14 if (b)
15 if (a != 0)
16 return 1;
17 return 0;
20 /* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */