aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/negminus.c
blob: f857a007983ea78115b8710a26138ece6701e441 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O -fno-rounding-math -fno-signed-zeros -fdump-tree-optimized-raw" } */

double f(double a, double b){
    double c = a - b;
    return -c;
}

int g(unsigned x){
    unsigned y = ~x;
    int z = (int) y;
    return -z;
}

unsigned h(unsigned a, unsigned b, unsigned c){
    unsigned d = b - c;
    unsigned e = a + d;
    return -e;
}

/* { dg-final { scan-tree-dump-not "negate_expr" "optimized"} } */