libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / cond-bool-2.c
blob7de89cc0de28b1a43af26d8ec572b21973d0ece2
1 /* { dg-do compile } */
2 /* { dg-options "-O2 --param logical-op-non-short-circuit=1 -fdump-tree-optimized-raw" } */
4 /* PR tree-optimization/95929 */
7 static inline _Bool nand(_Bool a, _Bool b)
9 return !(a && b);
12 _Bool f(int a, int b)
14 return nand(nand(b, nand(a, a)), nand(a, nand(b, b)));
17 /* We should be able to optimize this to (a != 0) ^ (b != 0) */
18 /* There should be no negate_expr nor gimple_cond here. */
20 /* { dg-final { scan-tree-dump-not "negate_expr, " "optimized" } } */
21 /* { dg-final { scan-tree-dump-times "ne_expr, " 2 "optimized" } } */
22 /* { dg-final { scan-tree-dump-not "gimple_cond " "optimized" } } */
23 /* { dg-final { scan-tree-dump-not "cond_expr, " "optimized" } } */
24 /* { dg-final { scan-tree-dump-not "gimple_phi " "optimized" } } */
25 /* { dg-final { scan-tree-dump-times "bit_xor_expr, " 1 "optimized" } } */
26 /* { dg-final { scan-tree-dump-times "gimple_assign " 3 "optimized" } } */