[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c sse.stepfft.c

Reid Spencer reid at x10sys.com
Thu Oct 19 09:54:26 PDT 2006



Changes in directory llvm-test/SingleSource/UnitTests/Vector/SSE:

sse.expandfft.c updated: 1.3 -> 1.4
sse.stepfft.c updated: 1.2 -> 1.3
---
Log message:

Change this program to use the valloc method as _mm_alloc is not present on all
platforms. valloc is overkill, but there's only four such allocations in the
program so it shouldn't cause scalability problems due to page-size allocations
and it will ensure the largest necessary alignment size on any platform.o

This helps the test program compile on Linux.


---
Diffs of the changes:  (+11 -9)

 sse.expandfft.c |   12 +++++++-----
 sse.stepfft.c   |    8 ++++----
 2 files changed, 11 insertions(+), 9 deletions(-)


Index: llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c
diff -u llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c:1.3 llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c:1.4
--- llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c:1.3	Tue Apr  4 13:51:30 2006
+++ llvm-test/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c	Thu Oct 19 11:54:12 2006
@@ -5,6 +5,7 @@
 #include "xmmintrin.h"
 #define N 1024
 #define N2 N/2
+
 main()
 {
 /* 
@@ -14,15 +15,16 @@
               wpp, SAM. Math. ETHZ 21 May, 2002 
 */
    int first,i,icase,it,n;
-   float error,fnm1,seed,sign,z0,z1,ggl();
+   double error;
+   float fnm1,seed,sign,z0,z1,ggl();
    float *x,*y,*z,*w;
    float t1,ln2,mflops;
    void cffti(),cfft2();
 /* allocate storage for x,y,z,w on 4-word bndr. */
-   x = (float *)_mm_malloc(8*N, 16);
-   y = (float *)_mm_malloc(8*N, 16);
-   z = (float *)_mm_malloc(8*N, 16);
-   w = (float *)_mm_malloc(4*N, 16);
+   x = (float *)valloc(8*N);
+   y = (float *)valloc(8*N);
+   z = (float *)valloc(8*N);
+   w = (float *)valloc(4*N);
    first = 1;
    seed  = 331.0;
    for(icase=0;icase<2;icase++){


Index: llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c
diff -u llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c:1.2 llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c:1.3
--- llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c:1.2	Tue Apr  4 13:52:26 2006
+++ llvm-test/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c	Thu Oct 19 11:54:12 2006
@@ -17,10 +17,10 @@
    float t1,ln2,mflops;
    void cffti(),cfft2();
 /* allocate storage for x,y,z,w on 4-word bndr. */
-   x = (float *)_mm_malloc(8*N, 16);
-   y = (float *)_mm_malloc(8*N, 16);
-   z = (float *)_mm_malloc(8*N, 16);
-   w = (float *)_mm_malloc(4*N, 16);
+   x = (float *)valloc(8*N);
+   y = (float *)valloc(8*N);
+   z = (float *)valloc(8*N);
+   w = (float *)valloc(4*N);
    first = 1;
    seed  = 331.0;
    for(icase=0;icase<2;icase++){






More information about the llvm-commits mailing list