comparison 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
comparison
equal deleted inserted replaced
18:1830386684a0 19:2b5abeee2509
1 /* PR33315 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-sink" } */
4
5 int num;
6 int a[20];
7
8 void test ()
9 {
10 int i;
11 int *ptr;
12 ptr = & a[0];
13 i = num;
14 if ( i == 1) *(ptr+0) = 0;
15 if ( i != 1) *(ptr+0) = 0;
16 if ( i == 2) *(ptr+1) = 0;
17 if ( i != 2) *(ptr+1) = 0;
18 if ( i == 3) *(ptr+2) = 0;
19 if ( i != 3) *(ptr+2) = 0;
20 }
21
22 /* We should sink/merge all stores and end up with a single BB. */
23
24 /* { dg-final { scan-tree-dump-times "MEM\[^\n\r\]* = 0;" 3 "sink" } } */
25 /* { dg-final { scan-tree-dump-times "<bb " 1 "sink" } } */