annotate gcc/testsuite/gcc.dg/pr50717-1.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR tree-optimization/50717 */
kono
parents:
diff changeset
2 /* Ensure that widening multiply-and-accumulate is not used where integer
kono
parents:
diff changeset
3 type promotion or users' casts should prevent it. */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 /* { dg-options "-O2 -fdump-tree-widening_mul" } */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 long long
kono
parents:
diff changeset
8 f (unsigned int a, char b, long long c)
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 return (a * b) + c;
kono
parents:
diff changeset
11 }
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 int
kono
parents:
diff changeset
14 g (short a, short b, int c)
kono
parents:
diff changeset
15 {
kono
parents:
diff changeset
16 return (short)(a * b) + c;
kono
parents:
diff changeset
17 }
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 int
kono
parents:
diff changeset
20 h (char a, char b, int c)
kono
parents:
diff changeset
21 {
kono
parents:
diff changeset
22 return (char)(a * b) + c;
kono
parents:
diff changeset
23 }
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 /* { dg-final { scan-tree-dump-times "WIDEN_MULT_PLUS_EXPR" 0 "widening_mul" } } */