Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/dup_compare_cond-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fgimple -O2 -fno-tree-ter -fdump-tree-optimized " } */
3 /* PR tree-optimization/116101 */
4
5 int __GIMPLE() f(int a, int b, int c, int d, int e)
6 {
7 _Bool t;
8 int ff;
9 int gg;
10 int res;
11 t = a == b;
12 ff = t ? a : e;
13 gg = t ? d : b;
14 res = ff+gg;
15 return res;
16 }
17
18 /* With -fno-tree-ter it is not useful to duplicate the comparison. */
19 /* { dg-final { scan-tree-dump-times " == " 1 "optimized" } } */