diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2015-03-04 07:59:49 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-04 07:59:50 +0000 |
commit | 8075018d7ad15059179e6ff7d0dd12071e1749b9 (patch) | |
tree | a53603ba19c956ff9de5fadda73ae0b71c33510e /gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa | |
parent | 7e8c3dad070b469494f5e8e09ee73cd99bb84c12 (diff) | |
parent | 6278c3db6b4eb6f38ccd27c1227452ad9915db28 (diff) | |
download | toolchain_gcc-8075018d7ad15059179e6ff7d0dd12071e1749b9.tar.gz toolchain_gcc-8075018d7ad15059179e6ff7d0dd12071e1749b9.tar.bz2 toolchain_gcc-8075018d7ad15059179e6ff7d0dd12071e1749b9.zip |
Merge "[4.9] Additional SLM tuning. Backport from trunk."
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/restrict-5.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/restrict-5.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/restrict-5.c new file mode 100644 index 000000000..d6c240aae --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/restrict-5.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim1-details" } */ + +static inline __attribute__((always_inline)) +void f(int * __restrict__ r, + int a[__restrict__ 16][16], + int b[__restrict__ 16][16], + int i, int j) +{ + int x; + *r = 0; + for (x = 1; x < 16; ++x) + *r = *r + a[i][x] * b[x][j]; +} + +void g(int *r, int a[16][16], int b[16][16], int i, int j) +{ + f (r, a, b, i ,j); +} + +/* We should apply store motion to the store to *r. */ + +/* { dg-final { scan-tree-dump "Executing store motion of \\\*r" "lim1" } } */ +/* { dg-final { cleanup-tree-dump "lim1" } } */ |