OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr50717-1.c] - Rev 701

Go to most recent revision | Compare with Previous | Blame | View Log

/* PR tree-optimization/50717  */
/* Ensure that widening multiply-and-accumulate is not used where integer
   type promotion or users' casts should prevent it.  */
 
/* { dg-options "-O2 -fdump-tree-widening_mul" } */
 
long long
f (unsigned int a, char b, long long c)
{
  return (a * b) + c;
}
 
int
g (short a, short b, int c)
{
  return (short)(a * b) + c;
}
 
int
h (char a, char b, int c)
{
  return (char)(a * b) + c;
}
 
/* { dg-final { scan-tree-dump-times "WIDEN_MULT_PLUS_EXPR" 0 "widening_mul" } } */
/* { dg-final { cleanup-tree-dump "widening_mul" } } */
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.