annotate gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-13.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 /* PR33315 */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 /* { dg-do compile } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3 /* { dg-options "-O2 -fdump-tree-sink" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 int num;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6 int a[20];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 void test ()
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 int i;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 int *ptr;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 ptr = & a[0];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 i = num;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 if ( i == 1) *(ptr+0) = 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 if ( i != 1) *(ptr+0) = 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 if ( i == 2) *(ptr+1) = 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 if ( i != 2) *(ptr+1) = 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 if ( i == 3) *(ptr+2) = 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 if ( i != 3) *(ptr+2) = 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22 /* We should sink/merge all stores and end up with a single BB. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 /* { dg-final { scan-tree-dump-times "MEM\[^\n\r\]* = 0;" 3 "sink" } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 /* { dg-final { scan-tree-dump-times "<bb " 1 "sink" } } */