diff options
author | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-10 23:56:25 +0000 |
---|---|---|
committer | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-10 23:56:25 +0000 |
commit | 2bffd6f3bba6e1746f5b7cd524d76b5b2e2eb48e (patch) | |
tree | 0d98bcea72447280d7282a59a38a7b203eabc2ef /gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-28.c | |
parent | 59bc598e01e292d67c32b6ae240b4544d4c234ab (diff) |
This commit was manufactured by cvs2svn to create tagapple/gcc-1749
'apple-gcc-1749'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/apple-gcc-1749@81686 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-28.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-28.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-28.c b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-28.c new file mode 100644 index 00000000000..2154aeb9f93 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-28.c @@ -0,0 +1,54 @@ +/* { dg-do run { target powerpc*-*-* } } */ +/* { dg-do compile { target i?86-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse" { target i?86-*-* } } */ + +#include <stdarg.h> +#include <signal.h> + +#define N 128 +#define OFF 3 + +/* unaligned store. */ + +int main1 (int off) +{ + int i; + int ia[N+OFF]; + + for (i = 0; i < N; i++) + { + ia[i+off] = 5; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (ia[i+off] != 5) + abort (); + } + + return 0; +} + +void +sig_ill_handler (int sig) +{ + exit(0); +} + +int main (void) +{ + /* Exit on systems without altivec. */ + signal (SIGILL, sig_ill_handler); + /* Altivec instruction, 'vor %v0,%v0,%v0'. */ + asm volatile (".long 0x10000484"); + signal (SIGILL, SIG_DFL); + + main1 (0); /* aligned */ + main1 (OFF); /* unaligned */ + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */ + |