[llvm-commits] [test-suite] r168264 - in /test-suite/trunk/SingleSource/Benchmarks: ./ LivermoreLoops/
Renato Golin
rengolin at systemcall.org
Sat Nov 17 10:52:22 PST 2012
Author: rengolin
Date: Sat Nov 17 12:52:20 2012
New Revision: 168264
URL: http://llvm.org/viewvc/llvm-project?rev=168264&view=rev
Log:
Adding simplified LivermoreLoops benchmarks, split kernels and created bogus heuristics for FP precision tests/vectorization
Added:
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/Makefile
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/README
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.c
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.reference_output
test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/lloops.h
Modified:
test-suite/trunk/SingleSource/Benchmarks/Makefile
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/Makefile?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/Makefile (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/Makefile Sat Nov 17 12:52:20 2012
@@ -0,0 +1,7 @@
+LEVEL = ../../..
+
+LDFLAGS += -m64 -lrt -lc -lm
+
+FP_TOLERANCE := 0.0001
+
+include $(LEVEL)/SingleSource/Makefile.singlesrc
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/README
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/README?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/README (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/README Sat Nov 17 12:52:20 2012
@@ -0,0 +1,68 @@
+This benchmark has been extensively modified to cope with LNT's infrastructure.
+
+It no longer checks for CPU frequency, nor produces comparable outputs to
+previous versions. The main reason to have this benchmark is to check both
+performance and correctness of floating point loop reductions during
+vectorization, so the heuristics provided is nothing more than just
+a floating point hash generated from some of the data to compare for
+floating point accuracy.
+
+Also, the timings are being taken on the whole executable (by LNT), so
+they're not as accurate as taking the inner loop, since there is considerable
+code to prepare the data and to calculate the heuristics.
+
+However, both prepare and heuristics are fp-loop based, so will also
+benefit from optimizations in that area, which will affect the final
+timing.
+
+File downloaded from http://www.roylongbottom.org.uk/classic.htm
+
+Extracted from original code at http://www.netlib.org/benchmark/livermorec
+
+/* Livermore Loops coded in C Latest File Modification 20 Oct 92,
+ * by Tim Peters, Kendall Square Res. Corp. tim at ksr.com, ksr!tim at uunet.uu.net
+ * SUBROUTINE KERNEL( TK) replaces the Fortran routine in LFK Test program.
+ ************************************************************************
+ * *
+ * KERNEL executes 24 samples of "C" computation *
+ * *
+ * TK(1) - total cpu time to execute only the 24 kernels.*
+ * TK(2) - total Flops executed by the 24 Kernels *
+ * *
+ ************************************************************************
+ * *
+ * L. L. N. L. " C " K E R N E L S: M F L O P S *
+ * *
+ * These kernels measure " C " numerical computation *
+ * rates for a spectrum of cpu-limited computational *
+ * structures or benchmarks. Mathematical through-put *
+ * is measured in units of millions of floating-point *
+ * operations executed per second, called Megaflops/sec. *
+ * *
+ * Fonzi's Law: There is not now and there never will be a language *
+ * in which it is the least bit difficult to write *
+ * bad programs. *
+ * F.H.MCMAHON 1972 *
+ ************************************************************************
+ *Originally from Greg Astfalk, AT&T, P.O.Box 900, Princeton, NJ. 08540*
+ * by way of Frank McMahon (LLNL). *
+ * *
+ * REFERENCE *
+ * *
+ * F.H.McMahon, The Livermore Fortran Kernels: *
+ * A Computer Test Of The Numerical Performance Range, *
+ * Lawrence Livermore National Laboratory, *
+ * Livermore, California, UCRL-53745, December 1986. *
+ * *
+ * from: National Technical Information Service *
+ * U.S. Department of Commerce *
+ * 5285 Port Royal Road *
+ * Springfield, VA. 22161 *
+ * *
+ * Changes made to correct many array subscripting problems, *
+ * make more readable (added #define's), include the original *
+ * FORTRAN versions of the runs as comments, and make more *
+ * portable by Kelly O'Hair (LLNL) and Chuck Rasbold (LLNL). *
+ * *
+ ************************************************************************
+ */
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,38 @@
+/***********************************************************************
+ * gcc kernel01.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 1 -- hydro fragment *
+********************************************************************/
+double kernel01()
+{
+ unsigned iter = 0;
+ long k;
+ double heuristics=0.0;
+
+ parameters (1);
+ do
+ {
+ for ( k=0 ; k<n ; k++ )
+ {
+ x[k] = q + y[k]*( r*z[k+10] + t*z[k+11] );
+ }
+
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += x[k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel01());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel01.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+114.305175
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,48 @@
+/***********************************************************************
+ * gcc kernel02.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/**********************************************************************
+* Kernel 2 -- ICCG excerpt (Incomplete Cholesky Conjugate Gradient) *
+**********************************************************************/
+double kernel02()
+{
+ long ipnt, ipntp, ii;
+ long i, k;
+ double heuristics=0.0;
+ unsigned iter = 0;
+
+ parameters (2);
+ do
+ {
+ ii = n;
+ ipntp = 0;
+ do
+ {
+ ipnt = ipntp;
+ ipntp += ii;
+ ii /= 2;
+ i = ipntp;
+ for ( k=ipnt+1 ; k<ipntp ; k=k+2 )
+ {
+ i++;
+ x[i] = x[k] - v[k]*x[k-1] - v[k+1]*x[k+1];
+ }
+ } while ( ii>0 );
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += x[k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel02());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel02.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+10.098717
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,36 @@
+/***********************************************************************
+ * gcc kernel03.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 3 -- inner product *
+********************************************************************/
+double kernel03()
+{
+ long k;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (3);
+ do
+ {
+ q = 0.0;
+ for ( k=0 ; k<n ; k++ )
+ {
+ q += z[k]*x[k];
+ }
+ heuristics += q;
+ }
+ while (iter++ < ITERATIONS);
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel03());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel03.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+1000752.890492
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,48 @@
+/***********************************************************************
+ * gcc kernel04.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 4 -- banded linear equations *
+********************************************************************/
+double kernel04()
+{
+ long lw;
+ double temp;
+ long j, k, m;
+ double heuristics=0.0;
+ unsigned iter = 0;
+
+ parameters (4);
+ m = ( 1001-7 )/2;
+ do
+ {
+ for ( k=6 ; k<1001 ; k=k+m )
+ {
+ lw = k - 6;
+ temp = x[k-1];
+
+ for ( j=4 ; j<n ; j=j+5 )
+ {
+ temp -= x[lw]*y[j];
+ lw++;
+ }
+ x[k-1] = y[4]*temp;
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += x[k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel04());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel04.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+23.058175
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,37 @@
+/***********************************************************************
+ * gcc kernel05.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 5 -- tri-diagonal elimination, below diagonal *
+********************************************************************/
+double kernel05()
+{
+ long i;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (5);
+ do
+ {
+ for ( i=1 ; i<n ; i++ )
+ {
+ x[i] = z[i]*( y[i] - x[i-1] );
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( i=0; i<n; i++ )
+ heuristics += x[i];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel05());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel05.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+64.724263
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,41 @@
+/***********************************************************************
+ * gcc kernel06.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 6 -- general linear recurrence equations *
+********************************************************************/
+double kernel06()
+{
+ long i, k;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (6);
+ do
+ {
+ for ( i=1 ; i<n ; i++ )
+ {
+ w[i] = 0.01;
+ for ( k=0 ; k<i ; k++ )
+ {
+ w[i] += b[k][i] * w[(i-k)-1];
+ }
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( i=0; i<n; i++ )
+ heuristics += w[i];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel06());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel06.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+0.726808
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,39 @@
+/***********************************************************************
+ * gcc kernel07.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 7 -- equation of state fragment *
+********************************************************************/
+double kernel07()
+{
+ long k;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (7);
+ do
+ {
+ for ( k=0 ; k<n ; k++ )
+ {
+ x[k] = u[k] + r*( z[k] + r*y[k] ) +
+ t*( u[k+3] + r*( u[k+2] + r*u[k+1] ) +
+ t*( u[k+6] + q*( u[k+5] + q*u[k+4] ) ) );
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += x[k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel07());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel07.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+128.666894
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,57 @@
+/***********************************************************************
+ * gcc kernel08.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 8 -- ADI integration *
+********************************************************************/
+double kernel08()
+{
+ long nl1, nl2;
+ long kx, ky;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ nl1 = 0;
+ nl2 = 1;
+
+ parameters (8);
+ do
+ {
+ for ( kx=1 ; kx<3 ; kx++ )
+ {
+
+ for ( ky=1 ; ky<n ; ky++ )
+ {
+ du1[ky] = u1[nl1][ky+1][kx] - u1[nl1][ky-1][kx];
+ du2[ky] = u2[nl1][ky+1][kx] - u2[nl1][ky-1][kx];
+ du3[ky] = u3[nl1][ky+1][kx] - u3[nl1][ky-1][kx];
+ u1[nl2][ky][kx]=
+ u1[nl1][ky][kx]+a11*du1[ky]+a12*du2[ky]+a13*du3[ky] + sig*
+ (u1[nl1][ky][kx+1]-2.0*u1[nl1][ky][kx]+u1[nl1][ky][kx-1]);
+ u2[nl2][ky][kx]=
+ u2[nl1][ky][kx]+a21*du1[ky]+a22*du2[ky]+a23*du3[ky] + sig*
+ (u2[nl1][ky][kx+1]-2.0*u2[nl1][ky][kx]+u2[nl1][ky][kx-1]);
+ u3[nl2][ky][kx]=
+ u3[nl1][ky][kx]+a31*du1[ky]+a32*du2[ky]+a33*du3[ky] + sig*
+ (u3[nl1][ky][kx+1]-2.0*u3[nl1][ky][kx]+u3[nl1][ky][kx-1]);
+ }
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( kx=0; kx<3; kx++ )
+ for ( ky=0; ky<n; ky++ )
+ heuristics += u3[nl2][ky][kx];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel08());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel08.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+29.995340
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,40 @@
+/***********************************************************************
+ * gcc kernel09.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 9 -- integrate predictors *
+********************************************************************/
+double kernel09()
+{
+ long i;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (9);
+ do
+ {
+ for ( i=0 ; i<n ; i++ )
+ {
+ px[i][0] = dm28*px[i][12] + dm27*px[i][11] + dm26*px[i][10] +
+ dm25*px[i][ 9] + dm24*px[i][ 8] + dm23*px[i][ 7] +
+ dm22*px[i][ 6] + c0*( px[i][ 4] + px[i][ 5])
+ + px[i][ 2];
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( i=0; i<n; i++ )
+ heuristics += px[i][0];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel09());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel09.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+-0.023686
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,54 @@
+/***********************************************************************
+ * gcc kernel10.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 10 -- difference predictors *
+********************************************************************/
+double kernel10()
+{
+ long i;
+ double ar, br, cr;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (10);
+ do
+ {
+ for ( i=0 ; i<n ; i++ )
+ {
+ ar = cx[i][ 4];
+ br = ar - px[i][ 4];
+ px[i][ 4] = ar;
+ cr = br - px[i][ 5];
+ px[i][ 5] = br;
+ ar = cr - px[i][ 6];
+ px[i][ 6] = cr;
+ br = ar - px[i][ 7];
+ px[i][ 7] = ar;
+ cr = br - px[i][ 8];
+ px[i][ 8] = br;
+ ar = cr - px[i][ 9];
+ px[i][ 9] = cr;
+ br = ar - px[i][10];
+ px[i][10] = ar;
+ cr = br - px[i][11];
+ px[i][11] = br;
+ px[i][13] = cr - px[i][12];
+ px[i][12] = cr;
+ }
+ heuristics += px[i][11]+px[i][12];
+ }
+ while (iter++ < ITERATIONS);
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel10());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel10.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+-24.687150
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,38 @@
+/***********************************************************************
+ * gcc kernel11.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 11 -- first sum *
+********************************************************************/
+double kernel11()
+{
+ long k;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (11);
+ do
+ {
+ x[0] = y[0];
+ for ( k=1 ; k<n ; k++ )
+ {
+ x[k] = x[k-1] + y[k];
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += x[k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel11());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel11.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+351535.161787
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,37 @@
+/***********************************************************************
+ * gcc kernel12.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 12 -- first difference *
+********************************************************************/
+double kernel12()
+{
+ long k;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (12);
+ do
+ {
+ for ( k=0 ; k<n ; k++ )
+ {
+ x[k] = y[k+1] - y[k];
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += x[k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel12());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel12.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+0.004074
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,53 @@
+/***********************************************************************
+ * gcc kernel13.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 13 -- 2-D PIC (Particle In Cell) *
+********************************************************************/
+double kernel13()
+{
+ long ip, i1, i2, j1, j2;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (13);
+ do
+ {
+ for ( ip=0; ip<n; ip++)
+ {
+ i1 = (long)p[ip][0];
+ j1 = (long)p[ip][1];
+ i1 &= 64-1;
+ j1 &= 64-1;
+ p[ip][2] += b[j1][i1];
+ p[ip][3] += c[j1][i1];
+ p[ip][0] += p[ip][2];
+ p[ip][1] += p[ip][3];
+ i2 = (long)p[ip][0];
+ j2 = (long)p[ip][1];
+ i2 = ( i2 & (64-1) ) - 1 ;
+ j2 = ( j2 & (64-1) ) - 1 ;
+ p[ip][0] += y[i2+32];
+ p[ip][1] += z[j2+32];
+ i2 += e[i2+32];
+ j2 += f[j2+32];
+ h[j2][i2] += 1.0;
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( ip=0; ip<n; ip++ )
+ heuristics += p[ip][0]+p[ip][1]+p[ip][2]+p[ip][3];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel13());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel13.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+8332792153.297057
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,56 @@
+/***********************************************************************
+ * gcc kernel14.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 14 -- 1-D PIC (Particle In Cell) *
+********************************************************************/
+double kernel14()
+{
+ long k;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (14);
+ do
+ {
+ for ( k=0 ; k<n ; k++ )
+ {
+ vx[k] = 0.0;
+ xx[k] = 0.0;
+ ix[k] = (long) grd[k];
+ xi[k] = (double) ix[k];
+ ex1[k] = ex[ ix[k] - 1 ];
+ dex1[k] = dex[ ix[k] - 1 ];
+ }
+ for ( k=0 ; k<n ; k++ )
+ {
+ vx[k] = vx[k] + ex1[k] + ( xx[k] - xi[k] )*dex1[k];
+ xx[k] = xx[k] + vx[k] + flx;
+ ir[k] = (long)xx[k];
+ rx[k] = xx[k] - ir[k];
+ ir[k] = ( ir[k] & (2048-1) ) + 1;
+ xx[k] = rx[k] + ir[k];
+ }
+ for ( k=0 ; k<n ; k++ )
+ {
+ rh[ ir[k]-1 ] += 1.0 - rx[k];
+ rh[ ir[k] ] += rx[k];
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += xx[k]+rh[ir[k]];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel14());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel14.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+105154353.678321
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,100 @@
+/***********************************************************************
+ * gcc kernel15.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 15 -- Casual Fortran. Development version *
+********************************************************************/
+double kernel15()
+{
+ double ar, br;
+ long j, k;
+ long ng, nz;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (15);
+ do
+ {
+ ng = 7;
+ nz = n;
+ ar = 0.053;
+ br = 0.073;
+ for ( j=1 ; j<ng ; j++ )
+ {
+ for ( k=1 ; k<nz ; k++ )
+ {
+ if ( (j+1) >= ng )
+ {
+ vy[j][k] = 0.0;
+ continue;
+ }
+ if ( vh[j+1][k] > vh[j][k] )
+ {
+ t = ar;
+ }
+ else
+ {
+ t = br;
+ }
+ if ( vf[j][k] < vf[j][k-1] )
+ {
+ if ( vh[j][k-1] > vh[j+1][k-1] )
+ r = vh[j][k-1];
+ else
+ r = vh[j+1][k-1];
+ s = vf[j][k-1];
+ }
+ else
+ {
+ if ( vh[j][k] > vh[j+1][k] )
+ r = vh[j][k];
+ else
+ r = vh[j+1][k];
+ s = vf[j][k];
+ }
+ vy[j][k] = sqrt( vg[j][k]*vg[j][k] + r*r )* t/s;
+ if ( (k+1) >= nz )
+ {
+ vs[j][k] = 0.0;
+ continue;
+ }
+ if ( vf[j][k] < vf[j-1][k] )
+ {
+ if ( vg[j-1][k] > vg[j-1][k+1] )
+ r = vg[j-1][k];
+ else
+ r = vg[j-1][k+1];
+ s = vf[j-1][k];
+ t = br;
+ }
+ else
+ {
+ if ( vg[j][k] > vg[j][k+1] )
+ r = vg[j][k];
+ else
+ r = vg[j][k+1];
+ s = vf[j][k];
+ t = ar;
+ }
+ vs[j][k] = sqrt( vh[j][k]*vh[j][k] + r*r )* t / s;
+ }
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( j=0; j<ng; j++ )
+ for ( k=0; k<nz; k++ )
+ heuristics += vs[j][k];;
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel15());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel15.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+-37.410287
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,97 @@
+/***********************************************************************
+ * gcc kernel16.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 16 -- Monte Carlo search loop *
+********************************************************************/
+double kernel16()
+{
+ long ii;
+ long k;
+ long i1, j2, j4, lb;
+ double tmp;
+ double heuristics=0.0;
+ unsigned iter = 0;
+
+ parameters (16);
+
+ ii = n / 3;
+ lb = ii + ii;
+ k3 = k2 = 0;
+ do
+ {
+ i1 = m16 = 1;
+ label410:
+ j2 = ( n + n )*( m16 - 1 ) + 1;
+ for ( k=1 ; k<=n ; k++ )
+ {
+ k2++;
+ j4 = j2 + k + k;
+ j5 = zone[j4-1];
+ if ( j5 < n )
+ {
+ if ( j5+lb < n )
+ { /* 420 */
+ tmp = plan[j5-1] - t; /* 435 */
+ }
+ else
+ {
+ if ( j5+ii < n )
+ { /* 415 */
+ tmp = plan[j5-1] - s; /* 430 */
+ }
+ else
+ {
+ tmp = plan[j5-1] - r; /* 425 */
+ }
+ }
+ }
+ else if( j5 == n )
+ {
+ break; /* 475 */
+ }
+ else
+ {
+ k3++; /* 450 */
+ tmp=(d[j5-1]-(d[j5-2]*(t-d[j5-3])*(t-d[j5-3])+(s-d[j5-4])*
+ (s-d[j5-4])+(r-d[j5-5])*(r-d[j5-5])));
+ }
+ if ( tmp < 0.0 )
+ {
+ if ( zone[j4-2] < 0 ) /* 445 */
+ continue; /* 470 */
+ else if ( !zone[j4-2] )
+ break; /* 480 */
+ }
+ else if ( tmp )
+ {
+ if ( zone[j4-2] > 0 ) /* 440 */
+ continue; /* 470 */
+ else if ( !zone[j4-2] )
+ break; /* 480 */
+ }
+ else break; /* 485 */
+ m16++; /* 455 */
+ if ( m16 > zone[0] )
+ m16 = 1; /* 460 */
+ if ( i1-m16 ) /* 465 */
+ goto label410;
+ else
+ break;
+ }
+ heuristics += tmp;
+ }
+ while (iter++ < ITERATIONS);
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel16());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel16.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+103398.570444
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,59 @@
+/***********************************************************************
+ * gcc kernel17.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 17 -- implicit, conditional computation *
+********************************************************************/
+double kernel17()
+{
+ long i, j;
+ double scale, xnei, xnc, e3,e6;
+ long ink;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (17);
+ do
+ {
+ i = n-1;
+ j = 0;
+ ink = -1;
+ scale = 5.0 / 3.0;
+ xnm = 1.0 / 3.0;
+ e6 = 1.03 / 3.07;
+ goto l61;
+ l60: e6 = xnm*vsp[i] + vstp[i];
+ vxne[i] = e6;
+ xnm = e6;
+ ve3[i] = e6;
+ i += ink;
+ if ( i==j ) goto end;
+ l61: e3 = xnm*vlr[i] + vlin[i];
+ xnei = vxne[i];
+ vxnd[i] = e6;
+ xnc = scale*e3;
+ if ( xnm > xnc ) goto l60;
+ if ( xnei > xnc ) goto l60;
+ ve3[i] = e3;
+ e6 = e3 + e3 - xnm;
+ vxne[i] = e3 + e3 - xnei;
+ xnm = e6;
+ i += ink;
+ if ( i != j ) goto l61;
+ end:
+ heuristics += xnm + xnc + xnei;
+ }
+ while (iter++ < ITERATIONS);
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel17());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel17.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+40734.646337
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,74 @@
+/***********************************************************************
+ * gcc kernel18.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 18 - 2-D explicit hydrodynamics fragment *
+********************************************************************/
+double kernel18()
+{
+ long j, k;
+ long jn, kn;
+ double heuristics=0.0;
+ unsigned iter = 0;
+
+ parameters (18);
+ do
+ {
+ t = 0.0037;
+ s = 0.0041;
+ kn = 6;
+ jn = n;
+ for ( k=1 ; k<kn ; k++ )
+ {
+
+ for ( j=1 ; j<jn ; j++ )
+ {
+ za[k][j] = ( zp[k+1][j-1] +zq[k+1][j-1] -zp[k][j-1] -zq[k][j-1] )*
+ ( zr[k][j] +zr[k][j-1] ) / ( zm[k][j-1] +zm[k+1][j-1]);
+ zb[k][j] = ( zp[k][j-1] +zq[k][j-1] -zp[k][j] -zq[k][j] ) *
+ ( zr[k][j] +zr[k-1][j] ) / ( zm[k][j] +zm[k][j-1]);
+ }
+ }
+ for ( k=1 ; k<kn ; k++ )
+ {
+
+ for ( j=1 ; j<jn ; j++ )
+ {
+ zu[k][j] += s*( za[k][j] *( zz[k][j] - zz[k][j+1] ) -
+ za[k][j-1] *( zz[k][j] - zz[k][j-1] ) -
+ zb[k][j] *( zz[k][j] - zz[k-1][j] ) +
+ zb[k+1][j] *( zz[k][j] - zz[k+1][j] ) );
+ zv[k][j] += s*( za[k][j] *( zr[k][j] - zr[k][j+1] ) -
+ za[k][j-1] *( zr[k][j] - zr[k][j-1] ) -
+ zb[k][j] *( zr[k][j] - zr[k-1][j] ) +
+ zb[k+1][j] *( zr[k][j] - zr[k+1][j] ) );
+ }
+ }
+ for ( k=1 ; k<kn ; k++ )
+ {
+
+ for ( j=1 ; j<jn ; j++ )
+ {
+ zr[k][j] = zr[k][j] + t*zu[k][j];
+ zz[k][j] = zz[k][j] + t*zv[k][j];
+ }
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<6; k++ )
+ for ( j=0; j<jn; j++ )
+ heuristics += (zu[k][j]*zv[k][j])+(zr[k][j]*zz[k][j]);
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel18());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel18.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+1.472564
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,46 @@
+/***********************************************************************
+ * gcc kernel19.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 19 -- general linear recurrence equations *
+********************************************************************/
+double kernel19()
+{
+ long i, k;
+ long kb5i;
+ double heuristics=0.0;
+ unsigned iter = 0;
+
+ parameters (19);
+ kb5i = 0;
+ do
+ {
+ for ( k=0 ; k<n ; k++ )
+ {
+ b5[k+kb5i] = sa[k] + stb5*sb[k];
+ stb5 = b5[k+kb5i] - stb5;
+ }
+ for ( i=1 ; i<=n ; i++ )
+ {
+ k = n - i;
+ b5[k+kb5i] = sa[k] + stb5*sb[k];
+ stb5 = b5[k+kb5i] - stb5;
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += b5[k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel19());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel19.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+10.629982
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,48 @@
+/***********************************************************************
+ * gcc kernel20.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/*************************************************************************
+* Kernel 20 - Discrete ordinates transport, conditional recurrence on xx *
+*************************************************************************/
+double kernel20()
+{
+ long k;
+ double di, dn;
+ double heuristics=0.0;
+ unsigned iter = 0;
+
+ parameters (20);
+ do
+ {
+ for ( k=0 ; k<n ; k++ )
+ {
+ di = y[k] - g[k] / ( xx[k] + dk );
+ dn = 0.2;
+
+ if ( di )
+ {
+ dn = z[k]/di ;
+ if ( t < dn ) dn = t;
+ if ( s > dn ) dn = s;
+ }
+ x[k] = ( ( w[k] + v[k]*dn )* xx[k] + u[k] ) / ( vx[k] + v[k]*dn );
+ xx[k+1] = ( x[k] - xx[k] )* dn + xx[k];
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += x[k] + xx[k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel20());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel20.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+91947.677434
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,45 @@
+/***********************************************************************
+ * gcc kernel21.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 21 -- matrix*matrix product *
+********************************************************************/
+double kernel21()
+{
+ long i, j, k;
+ double heuristics=0.0;
+ unsigned iter = 0;
+
+ parameters (21);
+ do
+ {
+ for ( k=0 ; k<25 ; k++ )
+ {
+ for ( i=0 ; i<25 ; i++ )
+ {
+ for ( j=0 ; j<n ; j++ )
+ {
+ px[j][i] += vy[k][i] * cx[j][k];
+ }
+ }
+ }
+ }
+ while (iter++ < ITERATIONS/10); /* this one takes a while! */
+
+ /* Inverse order iteration on purpose */
+ for ( j=0; j<n; j++ )
+ for ( k=0; k<25; k++ )
+ heuristics += px[j][k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel21());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel21.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+9.307049
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,42 @@
+/***********************************************************************
+ * gcc kernel22.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 22 -- Planckian distribution *
+********************************************************************/
+double kernel22()
+{
+ long k;
+ double heuristics=0.0;
+ unsigned iter = 0;
+
+ parameters (22);
+ start_time();
+
+ expmax = 20.0;
+ u[n-1] = 0.99*expmax*v[n-1];
+ do
+ {
+ for ( k=0 ; k<n ; k++ )
+ {
+ y[k] = u[k] / v[k];
+ w[k] = x[k] / ( exp( y[k] ) -1.0 );
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( k=0; k<n; k++ )
+ heuristics += w[k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel22());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel22.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+5.819019
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,44 @@
+/***********************************************************************
+ * gcc kernel23.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 23 -- 2-D implicit hydrodynamics fragment *
+********************************************************************/
+double kernel23()
+{
+ long j, k;
+ double qa;
+ double heuristics=0.0;
+ unsigned iter = 0;
+
+ parameters (23);
+ do
+ {
+ for ( j=1 ; j<6 ; j++ )
+ {
+ for ( k=1 ; k<n ; k++ )
+ {
+ qa = za[j+1][k]*zr[j][k] + za[j-1][k]*zb[j][k] +
+ za[j][k+1]*zu[j][k] + za[j][k-1]*zv[j][k] + zz[j][k];
+ za[j][k] += 0.175*( qa - za[j][k] );
+ }
+ }
+ }
+ while (iter++ < ITERATIONS);
+
+ for ( j=0; j<6; j++ )
+ for ( k=0; k<n; k++ )
+ heuristics += za[j][k];
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel23());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel23.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+-0.074030
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.c?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.c (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.c Sat Nov 17 12:52:20 2012
@@ -0,0 +1,37 @@
+/***********************************************************************
+ * gcc kernel24.c -m64 -lrt -lc -lm
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ */
+
+#include "lloops.h"
+
+/********************************************************************
+* Kernel 24 -- find location of first minimum in array *
+********************************************************************/
+double kernel24()
+{
+ long k;
+ unsigned iter = 0;
+ double heuristics=0.0;
+
+ parameters (24);
+ x[n/2] = -1.0e+10;
+ do
+ {
+ m24 = 0;
+ for ( k=1 ; k<n ; k++ )
+ {
+ if ( x[k] < x[m24] ) m24 = k;
+ }
+ heuristics += m24;
+ }
+ while (iter++ < ITERATIONS);
+
+ return heuristics;
+}
+
+int main(int argc, char *argv[])
+{
+ printf("%f\n", kernel24());
+ return 0;
+}
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.reference_output?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.reference_output (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/kernel24.reference_output Sat Nov 17 12:52:20 2012
@@ -0,0 +1,2 @@
+50000500.000000
+exit 0
Added: test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/lloops.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/lloops.h?rev=168264&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/lloops.h (added)
+++ test-suite/trunk/SingleSource/Benchmarks/LivermoreLoops/lloops.h Sat Nov 17 12:52:20 2012
@@ -0,0 +1,583 @@
+/**********************************************************************
+ * L. L. N. L. " C " K E R N E L S: M F L O P S P C V E R S I O N
+ *
+ * This is the header file that contains common code and the global
+ * variables in which the kernels operate into. These globals also work
+ * as a way to verify that the compiler can vectorize if the variables
+ * belong to global structures, so moving them to inside the kernel would
+ * invalidate that test.
+ *
+ * See each kernel (kernelNN.c) for more information on each test.
+ *
+ * This code have been tested on Linux/AMD_64 and is not guarantee to
+ * work on any other combination. If you know it does, please update
+ * this part of the comment.
+ */
+
+#include <stdio.h>
+#include <math.h>
+
+/* Timer */
+#include <time.h>
+struct timespec tp1;
+unsigned int millisecs = 0;
+double theseSecs = 0.0;
+double startSecs = 0.0;
+double secs;
+
+void getSecs()
+{
+ clock_gettime(CLOCK_REALTIME, &tp1);
+ theseSecs = tp1.tv_sec + tp1.tv_nsec / 1e9;
+}
+
+void start_time()
+{
+ getSecs();
+ startSecs = theseSecs;
+}
+
+void end_time()
+{
+ getSecs();
+ secs = theseSecs - startSecs;
+ millisecs = (int)(1000.0 * secs);
+}
+
+/* Test Variables */
+struct Arrays
+{
+ double U[1001];
+ double V[1001];
+ double W[1001];
+ double X[1001];
+ double Y[1001];
+ double Z[1001];
+ double G[1001];
+ double Du1[101];
+ double Du2[101];
+ double Du3[101];
+ double Grd[1001];
+ double Dex[1001];
+ double Xi[1001];
+ double Ex[1001];
+ double Ex1[1001];
+ double Dex1[1001];
+ double Vx[1001];
+ double Xx[1001];
+ double Rx[1001];
+ double Rh[2048];
+ double Vsp[101];
+ double Vstp[101];
+ double Vxne[101];
+ double Vxnd[101];
+ double Ve3[101];
+ double Vlr[101];
+ double Vlin[101];
+ double B5[101];
+ double Plan[300];
+ double D[300];
+ double Sa[101];
+ double Sb[101];
+ double P[512][4];
+ double Px[101][25];
+ double Cx[101][25];
+ double Vy[25][101];
+ double Vh[7][101];
+ double Vf[7][101];
+ double Vg[7][101];
+ double Vs[7][101];
+ double Za[7][101];
+ double Zp[7][101];
+ double Zq[7][101];
+ double Zr[7][101];
+ double Zm[7][101];
+ double Zb[7][101];
+ double Zu[7][101];
+ double Zv[7][101];
+ double Zz[7][101];
+ double B[64][64];
+ double C[64][64];
+ double H[64][64];
+ double U1[2][101][5];
+ double U2[2][101][5];
+ double U3[2][101][5];
+ double Xtra[40];
+ long E[96];
+ long F[96];
+ long Ix[1001];
+ long Ir[1001];
+ long Zone[301];
+ double X0[1001];
+ double W0[1001];
+ double Px0[101][25];
+ double P0[512][4];
+ double H0[64][64];
+ double Rh0[2048];
+ double Vxne0[101];
+ double Zr0[7][101];
+ double Zu0[7][101];
+ double Zv0[7][101];
+ double Zz0[7][101];
+ double Za0[101][25];
+ double Stb50;
+ double Xx0;
+}as1;
+
+#define u as1.U
+#define v as1.V
+#define w as1.W
+#define x as1.X
+#define y as1.Y
+#define z as1.Z
+#define g as1.G
+#define du1 as1.Du1
+#define du2 as1.Du2
+#define du3 as1.Du3
+#define grd as1.Grd
+#define dex as1.Dex
+#define xi as1.Xi
+#define ex as1.Ex
+#define ex1 as1.Ex1
+#define dex1 as1.Dex1
+#define vx as1.Vx
+#define xx as1.Xx
+#define rx as1.Rx
+#define rh as1.Rh
+#define vsp as1.Vsp
+#define vstp as1.Vstp
+#define vxne as1.Vxne
+#define vxnd as1.Vxnd
+#define ve3 as1.Ve3
+#define vlr as1.Vlr
+#define vlin as1.Vlin
+#define b5 as1.B5
+#define plan as1.Plan
+#define d as1.D
+#define sa as1.Sa
+#define sb as1.Sb
+#define p as1.P
+#define px as1.Px
+#define cx as1.Cx
+#define vy as1.Vy
+#define vh as1.Vh
+#define vf as1.Vf
+#define vg as1.Vg
+#define vs as1.Vs
+#define za as1.Za
+#define zb as1.Zb
+#define zp as1.Zp
+#define zq as1.Zq
+#define zr as1.Zr
+#define zm as1.Zm
+#define zz as1.Zz
+#define zu as1.Zu
+#define zv as1.Zv
+#define b as1.B
+#define c as1.C
+#define h as1.H
+#define u1 as1.U1
+#define u2 as1.U2
+#define u3 as1.U3
+#define xtra as1.Xtra
+#define a11 as1.Xtra[1]
+#define a12 as1.Xtra[2]
+#define a13 as1.Xtra[3]
+#define a21 as1.Xtra[4]
+#define a22 as1.Xtra[5]
+#define a23 as1.Xtra[6]
+#define a31 as1.Xtra[7]
+#define a32 as1.Xtra[8]
+#define a33 as1.Xtra[9]
+#define c0 as1.Xtra[12]
+#define dk as1.Xtra[15]
+#define dm22 as1.Xtra[16]
+#define dm23 as1.Xtra[17]
+#define dm24 as1.Xtra[18]
+#define dm25 as1.Xtra[19]
+#define dm26 as1.Xtra[20]
+#define dm27 as1.Xtra[21]
+#define dm28 as1.Xtra[22]
+#define expmax as1.Xtra[26]
+#define flx as1.Xtra[27]
+#define q as1.Xtra[28]
+#define r as1.Xtra[30]
+#define s as1.Xtra[32]
+#define sig as1.Xtra[34]
+#define stb5 as1.Xtra[35]
+#define t as1.Xtra[36]
+#define xnm as1.Xtra[39]
+#define e as1.E
+#define f as1.F
+#define ix as1.Ix
+#define ir as1.Ir
+#define zone as1.Zone
+#define x0 as1.X0
+#define w0 as1.W0
+#define px0 as1.Px0
+#define p0 as1.P0
+#define h0 as1.H0
+#define rh0 as1.Rh0
+#define vxne0 as1.Vxne0
+#define zr0 as1.Zr0
+#define zu0 as1.Zu0
+#define zv0 as1.Zv0
+#define zz0 as1.Zz0
+#define za0 as1.Za0
+#define stb50 as1.Stb50
+#define xx0 as1.Xx0
+
+struct Parameters
+{
+ long Inner_loops;
+ long Outer_loops;
+ long Loop_mult;
+ double Flops_per_loop;
+ double Sumcheck[3][25];
+ long Accuracy[3][25];
+ double LoopTime[3][25];
+ double LoopSpeed[3][25];
+ double LoopFlos[3][25];
+ long Xflops[25];
+ long Xloops[3][25];
+ long Nspan[3][25];
+ double TimeStart;
+ double TimeEnd;
+ double Loopohead;
+ long Count;
+ long Count2;
+ long Pass;
+ long Extra_loops[3][25];
+ long K2;
+ long K3;
+ long M16;
+ long J5;
+ long Section;
+ long N16;
+ double Mastersum;
+ long M24;
+
+
+}as2;
+
+#define n as2.Inner_loops
+#define loop as2.Outer_loops
+#define mult as2.Loop_mult
+#define nflops as2.Flops_per_loop
+#define Checksum as2.Sumcheck
+#define accuracy as2.Accuracy
+#define RunTime as2.LoopTime
+#define Mflops as2.LoopSpeed
+#define FPops as2.LoopFlos
+#define nspan as2.Nspan
+#define xflops as2.Xflops
+#define xloops as2.Xloops
+#define StartTime as2.TimeStart
+#define EndTime as2.TimeEnd
+#define overhead_l as2.Loopohead
+#define count as2.Count
+#define count2 as2.Count2
+#define pass as2.Pass
+#define extra_loops as2.Extra_loops
+#define k2 as2.K2
+#define k3 as2.K3
+#define m16 as2.M16
+#define j5 as2.J5
+#define section as2.Section
+#define n16 as2.N16
+#define MasterSum as2.Mastersum
+#define m24 as2.M24
+
+/* Forward declarations */
+void init(long);
+long parameters(long);
+void iqranf();
+
+/* These should really be a parameters */
+#define ITERATIONS 100000
+#define KERNELS 24
+
+/* Initialises arrays and variables */
+void init(long which)
+{
+ long i, j, k, l, m, nn;
+ double ds, dw, rr, ss;
+ double fuzz, fizz, buzz, scaled, one;
+
+ scaled = (double)(10.0);
+ scaled = (double)(1.0) / scaled;
+ fuzz = (double)(0.0012345);
+ buzz = (double)(1.0) + fuzz;
+ fizz = (double)(1.1) * fuzz;
+ one = (double)(1.0);
+
+ for ( k=0 ; k<19977 + 34132 ; k++)
+ {
+ if (k == 19977)
+ {
+ fuzz = (double)(0.0012345);
+ buzz = (double) (1.0) + fuzz;
+ fizz = (double) (1.1) * fuzz;
+ }
+ buzz = (one - fuzz) * buzz + fuzz;
+ fuzz = - fuzz;
+ u[k] = (buzz - fizz) * scaled;
+ }
+
+ fuzz = (double)(0.0012345);
+ buzz = (double) (1.0) + fuzz;
+ fizz = (double) (1.1) * fuzz;
+
+ for ( k=1 ; k<40 ; k++)
+ {
+ buzz = (one - fuzz) * buzz + fuzz;
+ fuzz = - fuzz;
+ xtra[k] = (buzz - fizz) * scaled;
+ }
+
+ ds = 1.0;
+ dw = 0.5;
+ for ( l=0 ; l<4 ; l++ )
+ {
+ for ( i=0 ; i<512 ; i++ )
+ {
+ p[i][l] = ds;
+ ds = ds + dw;
+ }
+ }
+ for ( i=0 ; i<96 ; i++ )
+ {
+ e[i] = 1;
+ f[i] = 1;
+ }
+
+
+ iqranf();
+ dw = -100.0;
+ for ( i=0; i<1001 ; i++ )
+ {
+ dex[i] = dw * dex[i];
+ grd[i] = ix[i];
+ y[i] = grd[i] * fizz;
+ }
+ flx = 0.001;
+
+
+ d[0]= 1.01980486428764;
+ nn = n16;
+
+ for ( l=1 ; l<300 ; l++ )
+ {
+ d[l] = d[l-1] + 1.000e-4 / d[l-1];
+ }
+ rr = d[nn-1];
+ for ( l=1 ; l<=2 ; l++ )
+ {
+ m = (nn+nn)*(l-1);
+ for ( j=1 ; j<=2 ; j++ )
+ {
+ for ( k=1 ; k<=nn ; k++ )
+ {
+ m = m + 1;
+ ss = (double)(k);
+ plan[m-1] = rr * ((ss + 1.0) / ss);
+ zone[m-1] = k + k;
+ }
+ }
+ }
+ k = nn + nn + 1;
+ zone[k-1] = nn;
+
+ if (which == 16)
+ {
+ r = d[n-1];
+ s = d[n-2];
+ t = d[n-3];
+ k3 = k2 = 0;
+ }
+ expmax = 20.0;
+ if (which == 22)
+ {
+ u[n-1] = 0.99*expmax*v[n-1];
+ }
+ if (which == 24)
+ {
+ x[n/2] = -1.0e+10;
+ }
+
+ /* Make copies of data for extra loops */
+
+ for ( i=0; i<1001 ; i++ )
+ {
+ x0[i] = x[i];
+ w0[i] = w[i];
+ for (j=0 ; j<25 ; j++ )
+ {
+ cx[i][j] = x[i]*buzz;
+ px[i][j] = w[i]*fuzz;
+ }
+ }
+ for ( i=0 ; i<101 ; i++ )
+ {
+ for (j=0 ; j<25 ; j++ )
+ {
+ px0[i][j] = px[i][j];
+ }
+ }
+ for ( i=0 ; i<512 ; i++ )
+ {
+ for (j=0 ; j<4 ; j++ )
+ {
+ p0[i][j] = p[i][j];
+ }
+ }
+ for ( i=0 ; i<64 ; i++ )
+ {
+ for (j=0 ; j<64 ; j++ )
+ {
+ h0[i][j] = h[i][j];
+ }
+ }
+ for ( i=0; i<2048 ; i++ )
+ {
+ rh0[i] = rh[i];
+ }
+ for ( i=0; i<101 ; i++ )
+ {
+ vxne0[i] = vxne[i];
+ }
+ for ( i=0 ; i<7 ; i++ )
+ {
+ for (j=0 ; j<101 ; j++ )
+ {
+ zr0[i][j] = zr[i][j];
+ zu0[i][j] = zu[i][j];
+ zv0[i][j] = zv[i][j];
+ zz0[i][j] = zz[i][j];
+ za0[i][j] = za[i][j];
+ }
+ }
+ stb50 = stb5;
+ xx0 = xx[0];
+
+ return;
+}
+
+/* Set up parameters for each kernel */
+long parameters(long which)
+{
+
+ long nloops[3][25] =
+ { {0, 1001, 101, 1001, 1001, 1001, 64, 995, 100,
+ 101, 101, 1001, 1000, 64, 1001, 101, 75,
+ 101, 100, 101, 1000, 101, 101, 100, 1001 },
+ {0, 101, 101, 101, 101, 101, 32, 101, 100,
+ 101, 101, 101, 100, 32, 101, 101, 40,
+ 101, 100, 101, 100, 50, 101, 100, 101 },
+ {0, 27, 15, 27, 27, 27, 8, 21, 14,
+ 15, 15, 27, 26, 8, 27, 15, 15,
+ 15, 14, 15, 26, 20, 15, 14, 27 } };
+
+
+
+ long lpass[3][25] =
+ { {0, 7, 67, 9, 14, 10, 3, 4, 10, 36, 34, 11, 12,
+ 36, 2, 1, 25, 35, 2, 39, 1, 1, 11, 8, 5 },
+ {0, 40, 40, 53, 70, 55, 7, 22, 6, 21, 19, 64, 68,
+ 41, 10, 1, 27, 20, 1, 23, 8, 1, 7, 5, 31 },
+ {0, 28, 46, 37, 38, 40, 21, 20, 9, 26, 25, 46, 48,
+ 31, 8, 1, 14, 26, 2, 28, 7, 1, 8, 7, 23 } };
+
+ double sums[3][25] =
+ {
+ { 0.0,
+ 5.114652693224671e+04, 1.539721811668385e+03, 1.000742883066363e+01,
+ 5.999250595473891e-01, 4.548871642387267e+03, 4.375116344729986e+03,
+ 6.104251075174761e+04, 1.501268005625798e+05, 1.189443609974981e+05,
+ 7.310369784325296e+04, 3.342910972650109e+07, 2.907141294167248e-05,
+ 1.202533961842803e+11, 3.165553044000334e+09, 3.943816690352042e+04,
+ 5.650760000000000e+05, 1.114641772902486e+03, 1.015727037502300e+05,
+ 5.421816960147207e+02, 3.040644339351239e+07, 1.597308280710199e+08,
+ 2.938604376566697e+02, 3.549900501563623e+04, 5.000000000000000e+02
+ },
+
+ { 0.0,
+ 5.253344778937972e+02, 1.539721811668385e+03, 1.009741436578952e+00,
+ 5.999250595473891e-01, 4.589031939600982e+01, 8.631675645333210e+01,
+ 6.345586315784055e+02, 1.501268005625798e+05, 1.189443609974981e+05,
+ 7.310369784325296e+04, 3.433560407475758e+04, 7.127569130821465e-06,
+ 9.816387810944345e+10, 3.039983465145393e+07, 3.943816690352042e+04,
+ 6.480410000000000e+05, 1.114641772902486e+03, 1.015727037502300e+05,
+ 5.421816960147207e+02, 3.126205178815431e+04, 7.824524877232093e+07,
+ 2.938604376566697e+02, 3.549900501563623e+04, 5.000000000000000e+01
+ },
+
+ { 0.0,
+ 3.855104502494961e+01, 3.953296986903059e+01, 2.699309089320672e-01,
+ 5.999250595473891e-01, 3.182615248447483e+00, 1.120309393467088e+00,
+ 2.845720217644024e+01, 2.960543667875003e+03, 2.623968460874250e+03,
+ 1.651291227698265e+03, 6.551161335845770e+02, 1.943435981130448e-06,
+ 3.847124199949426e+10, 2.923540598672011e+06, 1.108997288134785e+03,
+ 5.152160000000000e+05, 2.947368618589360e+01, 9.700646212337040e+02,
+ 1.268230698051003e+01, 5.987713249475302e+02, 5.009945671204667e+07,
+ 6.109968728263972e+00, 4.850340602749970e+02, 1.300000000000000e+01
+ } };
+
+
+
+ double number_flops[25] = {0, 5., 4., 2., 2., 2., 2., 16., 36., 17.,
+ 9., 1., 1., 7., 11., 33.,10., 9., 44.,
+ 6., 26., 2., 17., 11., 1.};
+
+ n = nloops[section][which];
+ nspan[section][which] = n;
+ n16 = nloops[section][16];
+ nflops = number_flops[which];
+ xflops[which] = (long)nflops;
+ loop = lpass[section][which];
+ xloops[section][which] = loop;
+ loop = loop * mult;
+ MasterSum = sums[section][which];
+ count = 0;
+
+ init(which);
+
+ return 0;
+}
+
+/* iqranf procedure - "random" number generator */
+void iqranf()
+{
+
+ long inset, Mmin, Mmax, nn, i, kk;
+ double span, spin, realn, per, scale1, qq, dkk, dp, dq;
+ long seed[3] = { 256, 12491249, 1499352848 };
+
+ nn = 1001;
+ Mmin = 1;
+ Mmax = 1001;
+ kk = seed[section];
+
+ inset= Mmin;
+ span= Mmax - Mmin;
+ spin= 16807;
+ per= 2147483647;
+ realn= nn;
+ scale1= 1.00001;
+ qq= scale1 * (span / realn);
+ dkk= kk;
+
+ for ( i=0 ; i<nn ; i++)
+ {
+ dp= dkk*spin;
+ dkk= dp - (long)( dp/per)*per;
+ dq= dkk*span;
+ ix[i] = inset + (long)( dq/ per);
+ if ((ix[i] < Mmin) | (ix[i] > Mmax))
+ {
+ ix[i] = inset + i + 1 * (long)qq;
+ }
+ }
+
+ return;
+}
Modified: test-suite/trunk/SingleSource/Benchmarks/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Makefile?rev=168264&r1=168263&r2=168264&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Benchmarks/Makefile (original)
+++ test-suite/trunk/SingleSource/Benchmarks/Makefile Sat Nov 17 12:52:20 2012
@@ -1,6 +1,6 @@
LEVEL = ../..
PARALLEL_DIRS := Dhrystone CoyoteBench Shootout Shootout-C++ Stanford McGill \
- Misc Misc-C++ Misc-C++-EH BenchmarkGame Adobe-C++ Polybench Linpack
+ Misc Misc-C++ Misc-C++-EH BenchmarkGame Adobe-C++ Polybench Linpack LivermoreLoops
LDFLAGS += -lm
# Disable Polybench tests on ARM for the time being, they are very long running.
More information about the llvm-commits
mailing list