arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr97997-1.c
blob3c4b468b88b9094a28de5dfeba1438d0531e0693
1 /* PR tree-optimization/97997 */
2 /* { dg-do compile { target { ilp32 || lp64 } } } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-times "return x_\[0-9]*\\\(D\\\);" 6 "optimized" } } */
5 /* { dg-final { scan-tree-dump-not " / " "optimized" } } */
6 /* { dg-final { scan-tree-dump-not " \\* " "optimized" } } */
8 unsigned short
9 f1 (unsigned short x)
11 return x * 10 / 10;
14 unsigned short
15 f2 (unsigned short x)
17 int a = x;
18 int b = 10;
19 int c = 10;
20 return a * b / c;
23 unsigned short
24 f3 (unsigned short x)
26 return x * 10U / 10;
29 unsigned short
30 f4 (unsigned short x)
32 unsigned a = x;
33 unsigned b = 10;
34 unsigned c = 10;
35 return a * b / c;
38 unsigned short
39 f5 (unsigned short x, unsigned short y)
41 return (unsigned) x * y / y;
44 unsigned int
45 f6 (unsigned int x, unsigned int y)
47 if (x >= 30000)
48 __builtin_unreachable ();
49 if (y >= ~0U / 30000)
50 __builtin_unreachable ();
51 return x * y / y;