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

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

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