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] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* 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" } } */
26
/* { dg-final { cleanup-tree-dump "widening_mul" } } */

powered by: WebSVN 2.1.0

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