aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr94920-2.c
blob: a2d23324cfac101dcd8f8de6d6012cd9ac10062a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR tree-optimization/94920 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

/* Form from PR.  */
__attribute__((noipa)) unsigned int foo(int x) {
    return x <= 0 ? -x : 0;
}

/* Changed order.  */
__attribute__((noipa)) unsigned int bar(int x) {
    return 0 >= x ? -x : 0;
}

/* { dg-final {scan-tree-dump-times " MAX_EXPR " 2 "optimized" } } */