Hi,
Pointer q in gcc.dg/vect/pr81196.c is not aligned after vectorization,
resulting test failure for some targets.
This simple patch adjust it so that it's aligned.
Is it OK?
Hi Rainer, could you please help me double check that this solves the issue?
Thanks,
bin
gcc/testsuite
2018-04-10 Bin Cheng <bin.ch...@arm.com>
PR testsuite/85190
* gcc.dg/vect/pr81196.c: Adjust pointer for aligned access.
diff --git a/gcc/testsuite/gcc.dg/vect/pr81196.c
b/gcc/testsuite/gcc.dg/vect/pr81196.c
index 46d7a9e..15320ae 100644
--- a/gcc/testsuite/gcc.dg/vect/pr81196.c
+++ b/gcc/testsuite/gcc.dg/vect/pr81196.c
@@ -4,14 +4,14 @@
void f(short*p){
p=(short*)__builtin_assume_aligned(p,64);
- short*q=p+256;
+ short*q=p+255;
for(;p!=q;++p,--q){
short t=*p;*p=*q;*q=t;
}
}
void b(short*p){
p=(short*)__builtin_assume_aligned(p,64);
- short*q=p+256;
+ short*q=p+255;
for(;p<q;++p,--q){
short t=*p;*p=*q;*q=t;
}