Changes in directory llvm-test/SingleSource/UnitTests/Vector:
sumarray-dbl.c added (r1.1) helpers.h updated: 1.3 -> 1.4 --- Log message: new testcase, which requires expansion of cross-block values. --- Diffs of the changes: (+36 -0) helpers.h | 14 ++++++++++++++ sumarray-dbl.c | 22 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) Index: llvm-test/SingleSource/UnitTests/Vector/sumarray-dbl.c diff -c /dev/null llvm-test/SingleSource/UnitTests/Vector/sumarray-dbl.c:1.1 *** /dev/null Thu Mar 30 20:11:56 2006 --- llvm-test/SingleSource/UnitTests/Vector/sumarray-dbl.c Thu Mar 30 20:11:46 2006 *************** *** 0 **** --- 1,22 ---- + #include "helpers.h" + + union Array { + v8sd Vectors[100]; + double Floats[800]; + }; + + union Array TheArray; + + void main() { + int i; + v8sd sum = { 0, 0, 0, 0, 0, 0, 0, 0}; + D8V sumV; + for (i = 0; i < 800; ++i) + TheArray.Floats[i] = i*12.345; + + for (i = 0; i < 100; ++i) + sum += TheArray.Vectors[i]; + + sumV.V = sum; + printD8V(&sumV); + } Index: llvm-test/SingleSource/UnitTests/Vector/helpers.h diff -u llvm-test/SingleSource/UnitTests/Vector/helpers.h:1.3 llvm-test/SingleSource/UnitTests/Vector/helpers.h:1.4 --- llvm-test/SingleSource/UnitTests/Vector/helpers.h:1.3 Thu Mar 23 19:18:59 2006 +++ llvm-test/SingleSource/UnitTests/Vector/helpers.h Thu Mar 30 20:11:46 2006 @@ -3,6 +3,10 @@ typedef float v4sf __attribute__ ((__vector_size__ (16))); typedef double v2sd __attribute__ ((__vector_size__ (16))); +// These require legalization. +typedef float v8sf __attribute__ ((__vector_size__ (32))); +typedef double v8sd __attribute__ ((__vector_size__ (64))); + typedef union { v4sf V; float A[4]; @@ -13,6 +17,11 @@ double A[2]; } DV; +typedef union { + v8sd V; + double A[8]; +} D8V; + static void printFV(FV *F) { printf("%f %f %f %f\n", F->A[0], F->A[1], F->A[2], F->A[3]); } @@ -20,3 +29,8 @@ static void printDV(DV *D) { printf("%g %g\n", D->A[0], D->A[1]); } + +static void printD8V(D8V *D) { + printf("%g %g %g %g %g %g %g %g\n", D->A[0], D->A[1], D->A[2], D->A[3], + D->A[4], D->A[5], D->A[6], D->A[7]); +} _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits