[llvm-commits] [test-suite] r40434 - in /test-suite/trunk/SingleSource/UnitTests/Vector/SSE: sse.expandfft.c sse.isamax.c sse.stepfft.c

Duncan Sands baldrick at free.fr
Mon Jul 23 04:41:11 PDT 2007


Author: baldrick
Date: Mon Jul 23 06:41:10 2007
New Revision: 40434

URL: http://llvm.org/viewvc/llvm-project?rev=40434&view=rev
Log:
Fix these in a more interesting way.

Modified:
    test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c
    test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c
    test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c

Modified: test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c?rev=40434&r1=40433&r2=40434&view=diff

==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c Mon Jul 23 06:41:10 2007
@@ -94,8 +94,9 @@
    int jb, jc, jw, k, k2, lj, m, j, mj, mj2, pass, tgle;
    float (*a)[2],(*b)[2],(*c)[2],(*d)[2];
    float (*aa)[2],(*bb)[2],(*cb)[2],(*dd)[2];
-   float rp,up,wra[7],wua[7];
-   float *wr = wra, *wu = wua;
+   float rp,up;
+   float wr[4] __attribute__ ((aligned (16)));
+   float wu[4] __attribute__ ((aligned (16)));
    __m128 V0,V1,V2,V3,V4,V5,V6,V7;
    __m128 V8,V9,V10,V11,V12,V13,V14,V15;
 
@@ -108,8 +109,6 @@
    mj   = 1;
    mj2  = 2;
    lj   = n/2;
-   wr += (4 - ((unsigned int) wr >> 2)) & 0x03; // align wr
-   wu += (4 - ((unsigned int) wu >> 2)) & 0x03; // align wu
 // first pass thru data: x -> y
    a = (void *)&x[0][0];
    b = (void *)&x[n/2][0];

Modified: test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c?rev=40434&r1=40433&r2=40434&view=diff

==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c Mon Jul 23 06:41:10 2007
@@ -30,8 +30,8 @@
   float bbig,ebig,bres,*xp;
   int eres,i,ibbig,iebig,align,nsegs,mb,nn;
   __m128 offset4,V0,V1,V2,V3,V6,V7;
-  float xbiga[11],indxa[11];
-  float *xbig = xbiga, *indx = indxa;
+  float xbig[8] __attribute__ ((aligned (16)));
+  float indx[8] __attribute__ ((aligned (16)));
 // n < NS done in scalar mode
   if(n < NS){
      iebig = 0;
@@ -100,8 +100,6 @@
      V7 = _mm_max_ps(V7,V3);
   }
 // Now finish up: segment maxima are in V0, indices in V7
-  xbig += (4 - ((unsigned int) xbig >> 2)) & 0x03; // align xbig
-  indx += (4 - ((unsigned int) indx >> 2)) & 0x03; // align indx
   _mm_store_ps(xbig,V0);
   _mm_store_ps(indx,V7);
   if(eres>0){

Modified: test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c?rev=40434&r1=40433&r2=40434&view=diff

==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c Mon Jul 23 06:41:10 2007
@@ -156,16 +156,14 @@
 float a[][2],b[][2],c[][2],d[][2],w[][2],sign;
 {
    int j,k,jc,jw,l,lj,mj2,mseg;
-   float rp,up,wra[7],wua[7];
+   float rp,up;
+   float wr[4] __attribute__ ((aligned (16)));
+   float wu[4] __attribute__ ((aligned (16)));
    __m128 xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7;
-   float *wr = wra, *wu = wua;
 
    mj2 = 2*mj;
    lj  = n/mj2;
 
-   wr += (4 - ((unsigned int) wr >> 2)) & 0x03; // align wr
-   wu += (4 - ((unsigned int) wu >> 2)) & 0x03; // align wu
-
    for(j=0; j<lj; j++){
       jw  = j*mj; jc  = j*mj2;
       rp = w[jw][0];





More information about the llvm-commits mailing list