[llvm-commits] [test-suite] r165798 - in /test-suite/trunk: External/HMMER/Makefile SingleSource/UnitTests/Vector/Altivec/Makefile SingleSource/UnitTests/Vector/Altivec/alti.expandfft.c SingleSource/UnitTests/Vector/Altivec/alti.isamax.c SingleSource/UnitTests/Vector/Altivec/alti.sdot.c SingleSource/UnitTests/Vector/Altivec/alti.stepfft.c SingleSource/UnitTests/Vector/Altivec/casts.c
Ulrich Weigand
ulrich.weigand at de.ibm.com
Fri Oct 12 08:19:02 PDT 2012
Author: uweigand
Date: Fri Oct 12 10:19:02 2012
New Revision: 165798
URL: http://llvm.org/viewvc/llvm-project?rev=165798&view=rev
Log:
Allow AltiVec tests to be built under FSF GCC by removing use
of Apple AltiVec features:
- -faltivec command line option
- vector initializer syntax using parentheses
Replace by equivalent features supported across compilers.
Modified:
test-suite/trunk/External/HMMER/Makefile
test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/Makefile
test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.expandfft.c
test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.isamax.c
test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.sdot.c
test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.stepfft.c
test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/casts.c
Modified: test-suite/trunk/External/HMMER/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/HMMER/Makefile?rev=165798&r1=165797&r2=165798&view=diff
==============================================================================
--- test-suite/trunk/External/HMMER/Makefile (original)
+++ test-suite/trunk/External/HMMER/Makefile Fri Oct 12 10:19:02 2012
@@ -10,8 +10,8 @@
LDFLAGS += -lpthread
ifeq ($(ARCH),PowerPC)
-TARGET_FLAGS += -maltivec -faltivec
-LCCFLAGS += -maltivec -faltivec
+TARGET_FLAGS += -maltivec
+LCCFLAGS += -maltivec
endif
# Make sure HMMER temporary file is removed, it will break the test.
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=165798&r1=165797&r2=165798&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/Makefile (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/Makefile Fri Oct 12 10:19:02 2012
@@ -6,5 +6,5 @@
FP_TOLERANCE := 0.002
include $(LEVEL)/SingleSource/Makefile.singlesrc
-TARGET_FLAGS += -maltivec -faltivec
-LCCFLAGS += -maltivec -faltivec
+TARGET_FLAGS += -maltivec
+LCCFLAGS += -maltivec
Modified: test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.expandfft.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.expandfft.c?rev=165798&r1=165797&r2=165798&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.expandfft.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.expandfft.c Fri Oct 12 10:19:02 2012
@@ -107,10 +107,10 @@
float rp,up,wr[4] __attribute((aligned(16)));
float wu[4] __attribute((aligned(16)));
float *a,*b,*c,*d;
- const vector float vminus = (vector float)(-0.,0.,-0.,0.);
- const vector float vzero = (vector float)(0.,0.,0.,0.);
+ const vector float vminus = (vector float){-0.,0.,-0.,0.};
+ const vector float vzero = (vector float){0.,0.,0.,0.};
const vector unsigned char pv3201 =
- (vector unsigned char)(4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11);
+ (vector unsigned char){4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11};
vector float V0,V1,V2,V3,V4,V5,V6,V7;
vector float V8,V9,V10,V11,V12,V13,V14,V15;
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=165798&r1=165797&r2=165798&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.isamax.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.isamax.c Fri Oct 12 10:19:02 2012
@@ -52,10 +52,10 @@
int i,ii,nres,nsegs,ibig,irbig;
vector float V0,V1,V6;
vector bool int V3;
- vector float V2 = (vector float) (0.0,1.0,2.0,3.0);
- 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);
+ vector float V2 = (vector float) {0.0,1.0,2.0,3.0};
+ 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;
float xbig[4] __attribute__((aligned(16)));
float indx[4] __attribute__((aligned(16)));
Modified: test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.sdot.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.sdot.c?rev=165798&r1=165797&r2=165798&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.sdot.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.sdot.c Fri Oct 12 10:19:02 2012
@@ -43,7 +43,7 @@
{
float sum,*xp,*yp;
int i,ii,nres,nsegs;
- vector float V7 = (vector float)(0.0,0.0,0.0,0.0);
+ vector float V7 = (vector float){0.0,0.0,0.0,0.0};
vector float V0,V1;
float psum[4] __attribute__((aligned(16)));
// n < NS done in scalar mode
Modified: test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.stepfft.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.stepfft.c?rev=165798&r1=165797&r2=165798&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.stepfft.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/alti.stepfft.c Fri Oct 12 10:19:02 2012
@@ -131,10 +131,10 @@
int j,k,jc,jw,l,lj,mj2;
float rp,up;
float wr[4] __attribute((aligned(16))), wu[4] __attribute((aligned(16)));
- const vector float vminus = (vector float)(-0.,0.,-0.,0.);
- const vector float vzero = (vector float)(0.,0.,0.,0.);
+ const vector float vminus = (vector float){-0.,0.,-0.,0.};
+ const vector float vzero = (vector float){0.,0.,0.,0.};
const vector unsigned char pv3201 =
- (vector unsigned char)(4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11);
+ (vector unsigned char){4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11};
vector float v0,v1,v2,v3,v4,v5,v6,v7;
mj2 = 2*mj;
Modified: test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/casts.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/casts.c?rev=165798&r1=165797&r2=165798&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/casts.c (original)
+++ test-suite/trunk/SingleSource/UnitTests/Vector/Altivec/casts.c Fri Oct 12 10:19:02 2012
@@ -14,10 +14,10 @@
}
void test2(float F, vector float *R) {
- *R = (vector float)(F);
+ *R = (vector float){F,F,F,F};
}
void test2a(float F, vector float *X, vector float *R) {
- *R = (vector float)(F) + *X;
+ *R = (vector float){F,F,F,F} + *X;
}
More information about the llvm-commits
mailing list