[llvm-commits] [test-suite] r41977 - in /test-suite/trunk/SingleSource/UnitTests/Vector/Altivec: Makefile alti.isamax.c
Chris Lattner
sabre at nondot.org
Fri Sep 14 21:43:13 PDT 2007
Author: lattner
Date: Fri Sep 14 23:43:12 2007
New Revision: 41977
URL: http://llvm.org/viewvc/llvm-project?rev=41977&view=rev
Log:
some portability fixes
Modified:
test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/Makefile
test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.isamax.c
Modified: test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/Makefile?rev=41977&r1=41976&r2=41977&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/Makefile (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/Makefile Fri Sep 14 23:43:12 2007
@@ -7,5 +7,5 @@
# FIXME: CBE doesn't support vectors: PR1126
DISABLE_CBE=1
-TARGET_FLAGS += -maltivec
-LCCFLAGS += -maltivec
+TARGET_FLAGS += -maltivec -faltivec
+LCCFLAGS += -maltivec -faltivec
Modified: test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.isamax.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.isamax.c?rev=41977&r1=41976&r2=41977&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.isamax.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.isamax.c Fri Sep 14 23:43:12 2007
@@ -2,7 +2,7 @@
#include <math.h>
#include <float.h>
#include <altivec.h>
-#define N 1027
+#define N 1028
main()
{
/*
@@ -12,7 +12,7 @@
Oxford Univ. Press, 2004
wpp 5/8/2002
*/
- float x[N];
+ float x[N] __attribute__((aligned(16)));
float xb;
int err,flag,i,im,k,ki,kl,ib,n0,n;
int isamax(int,float *);
@@ -43,6 +43,7 @@
kl = 4; // for n > 1, 3 steps of increase in n
}
if(flag==0) printf(" All n tests pass\n");
+ return 0;
}
#define NS 12
int isamax(int n, float *x)
@@ -55,7 +56,9 @@
vector float V7 = (vector float) (0.0,1.0,2.0,3.0);
const vector float incr_4 = (vector float) (4.0,4.0,4.0,4.0);
const vector float minus0 = (vector float) (-0.0,-0.0,-0.0,-0.0);
- float big,xbig[4],indx[4];
+ float big;
+ float xbig[4] __attribute__((aligned(16)));
+ float indx[4] __attribute__((aligned(16)));
// n < NS done in scalar mode
if(n < NS){
ibig = 0;
More information about the llvm-commits
mailing list