diff options
| author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-06 17:06:06 +0000 |
|---|---|---|
| committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-06 17:06:06 +0000 |
| commit | 2f4b825ca130cdb04490571b58a80bbed52c6f0a (patch) | |
| tree | e80c46c7eb646da75d5e49de5a4b8482f7154915 /llvm/test/ary3.c | |
| parent | 074d52d60d2576e92400a92ec4f48ebfff55a912 (diff) | |
| download | bcm5719-llvm-2f4b825ca130cdb04490571b58a80bbed52c6f0a.tar.gz bcm5719-llvm-2f4b825ca130cdb04490571b58a80bbed52c6f0a.zip | |
Moved *.c files into subdirectory TestSources to avoid overwriting
corresponding *.ll files.
llvm-svn: 1155
Diffstat (limited to 'llvm/test/ary3.c')
| -rw-r--r-- | llvm/test/ary3.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/llvm/test/ary3.c b/llvm/test/ary3.c deleted file mode 100644 index 3bb99f9362d..00000000000 --- a/llvm/test/ary3.c +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- mode: c -*- - * $Id$ - * http://www.bagley.org/~doug/shootout/ - * - * this program is modified from: - * http://cm.bell-labs.com/cm/cs/who/bwk/interps/pap.html - * Timing Trials, or, the Trials of Timing: Experiments with Scripting - * and User-Interface Languages</a> by Brian W. Kernighan and - * Christopher J. Van Wyk. - * - * I added free() to deallocate memory. - */ - -#include <stdio.h> -#include <stdlib.h> - -int -main(int argc, char *argv[]) { - int n = ((argc == 2) ? atoi(argv[1]) : 1); - int i, k, *x, *y; - - x = (int *) calloc(n, sizeof(int)); - y = (int *) calloc(n, sizeof(int)); - - for (i = 0; i < n; i++) { - x[i] = i + 1; - } - for (k=0; k<1000; k++) { - for (i = n-1; i >= 0; i--) { - y[i] += x[i]; - } - } - - printf("%d %d\n", y[0], y[n-1]); - - free(x); - free(y); - - return(0); -} - |

