view gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-12.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-lim2" } */

int a[1024];

void foo (int x, int z)
{
  int i;
  int y = -x;
  for (i = 0; i < 1024; ++i)
    a[i] = x ? y : z;
}

void bar (int x, int z)
{
  int j;
  for (j = 0; j < 1024; ++j)
    {
      int i;
      int y = -j + z;
      for (i = 0; i < 1024; ++i)
	a[i] = x ? y : j;
    }
}

/* { dg-final { scan-tree-dump-times "!= 0 ? " 2 "lim2" } } */