libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / cmpeq-1.c
blob1d5b960b663da4723bfc31e6b896eaa974a45eb1
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized-raw" } */
3 /* PR tree-optimization/109959 */
5 unsigned fu(unsigned a)
7 _Bool t = a <= 1;
8 return t & a;
11 _Bool fb(unsigned a)
13 _Bool t = a <= 1;
14 return t & a;
17 _Bool fb1(unsigned a)
19 _Bool t = a <= 1;
20 _Bool t1 = a;
21 return t & t1;
24 signed fui(unsigned a)
26 _Bool t = a <= 1;
27 int ai = a;
28 return t & ai;
31 /* These all should be optimized to `a == 1` */
32 /* { dg-final { scan-tree-dump-times "eq_expr," 4 "optimized"} } */
33 /* { dg-final { scan-tree-dump-not "le_expr," "optimized"} } */
34 /* { dg-final { scan-tree-dump-not "bit_and_expr," "optimized"} } */