aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr89430-2.c
blob: bb39df2be8e1c308e2d9a1d69dc546339fdc398b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */

int c;
unsigned test(unsigned k, unsigned b) {
        unsigned a[2];
	a[k] = c;
        if (b < a[k]) {
                a[k] = b;
        }
        return a[0]+a[1];
}

/* { dg-final { scan-tree-dump "Conditional store replacement" "cselim" } } */