1 /* PR78413.  These previously failed in tree if-conversion due to a loop
2    latch with multiple predecessors that the code did not anticipate.  */
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -ffast-math -fno-strict-aliasing" } */
5 
6 extern long long int llrint(double x);
7 int a;
8 double b;
decode_init()9 __attribute__((cold)) void decode_init() {
10   int c, d = 0;
11   for (; d < 12; d++) {
12     if (d)
13       b = 0;
14     c = 0;
15     for (; c < 6; c++)
16       a = b ? llrint(b) : 0;
17   }
18 }
19 
20 struct S {
21   _Bool bo;
22 };
23 int a, bb, c, d;
fn1()24 void fn1() {
25   do
26     do
27       do {
28 	struct S *e = (struct S *)1;
29 	do
30 	  bb = a / (e->bo ? 2 : 1);
31 	while (bb);
32       } while (0);
33     while (d);
34   while (c);
35 }
36