view gcc/testsuite/gcc.dg/wmul-1.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

/* Not to fuse widening multiply with accumulate if the multiply has more than
   one uses.
   Note that for targets where pointer and int are of the same size or
   widening multiply-and-accumulate is not available, this test just passes.  */

/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-widening_mul" } */

typedef int ArrT [10][10];

void
foo (ArrT Arr, int Idx)
{
  Arr[Idx][Idx] = 1;
  Arr[Idx + 10][Idx] = 2;
}

/* { dg-final { scan-tree-dump-not "WIDEN_MULT_PLUS_EXPR" "widening_mul" } } */