libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / phi-opt-42.c
blob62556945159ce778c1bb6a0038a21e79d5c95b03
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
4 /* PR tree-optimization/116890 */
6 int f(int a, int b, int c)
8 int x;
9 if (c) x = a == 0;
10 else x = 0;
11 return x;
15 /* The if should have been removed as the the conversion from bool to int should have been factored out. */
16 /* { dg-final { scan-tree-dump-not "if" "optimized" } }*/
17 /* { dg-final { scan-tree-dump-times "\[^\r\n\]*_\[0-9\]* = a_\[0-9\]*.D. == 0" 1 "optimized" } } */
18 /* { dg-final { scan-tree-dump-times "\[^\r\n\]*_\[0-9\]* = c_\[0-9\]*.D. != 0" 1 "optimized" } } */