IBM Z: Prevent mach optimization on doloop patterns
[official-gcc.git] / gcc / testsuite / gcc.target / s390 / 20200617.c
blob067d2e1d90ba901883b5fd5eabaf04284e2922b9
1 /* This ICE'd before f9e1ea10e657af9fb02fafecf1a600740fd34409 because
2 a doloop pattern with a dead set of the iteration variable was
3 generated and s390_fix_long_loop_prediction then failed to
4 recognize it as branch on count pattern. */
6 /* { dg-do compile } */
7 /* { dg-options "-O3 -march=z10" } */
9 int a, d, e, f;
10 long b;
11 long *volatile c;
12 void
13 fn1() {
14 for (; e; ++e)
15 if (d)
17 else {
18 a = 0;
19 for (; a != 14; ++a)
20 *c = b && f;
21 d = 8;