aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/addadd.c
blob: 16474db65658a5e3e88b141b24f991c80936a9e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-optimized" } */

int f(unsigned x){
  x += 123;
  int y = x;
  y -= 99;
  return y;
}
unsigned g(int x){
  x += 123;
  unsigned y = x;
  y -= 99;
  return y;
}
int h(int x){
  x += __INT_MAX__;
  x += 1;
  return x;
}
int i(int x){
  x += __INT_MAX__;
  x += __INT_MAX__;
  return x;
}
typedef int S __attribute__((vector_size(16)));
void j(S*x){
  *x += __INT_MAX__;
  *x += __INT_MAX__;
}

/* { dg-final { scan-tree-dump-times " \\+ 24;" 2 "optimized" } } */
/* { dg-final { scan-tree-dump-times "\\(unsigned int\\)" 2 "optimized" } } */
/* { dg-final { scan-tree-dump-not "2147483647" "optimized" } } */