(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr50717-1.c
       1  /* PR tree-optimization/50717  */
       2  /* Ensure that widening multiply-and-accumulate is not used where integer
       3     type promotion or users' casts should prevent it.  */
       4  
       5  /* { dg-options "-O2 -fdump-tree-widening_mul" } */
       6  
       7  long long
       8  f (unsigned int a, char b, long long c)
       9  {
      10    return (a * b) + c;
      11  }
      12  
      13  int
      14  g (short a, short b, int c)
      15  {
      16    return (short)(a * b) + c;
      17  }
      18  
      19  int
      20  h (char a, char b, int c)
      21  {
      22    return (char)(a * b) + c;
      23  }
      24  
      25  /* { dg-final { scan-tree-dump-times "WIDEN_MULT_PLUS_EXPR" 0 "widening_mul" } } */