Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/tree-ssa/slsr-7.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* Verify straight-line strength reduction for simple integer subtraction. */ |
2 | |
3 /* { dg-do compile } */ | |
4 /* { dg-options "-O3 -fdump-tree-optimized" } */ | |
5 | |
6 int | |
7 f (int s, int c) | |
8 { | |
9 int a1, a2, a3, x1, x2, x3, x; | |
10 | |
11 a1 = 2 * s; | |
12 x1 = c - a1; | |
13 a2 = 4 * s; | |
14 x2 = c - a2; | |
15 a3 = 6 * s; | |
16 x3 = c - a3; | |
17 x = x1 + x2 + x3; | |
18 return x; | |
19 } | |
20 | |
21 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */ |