Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/tree-ssa/slsr-7.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
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" } } */ |