Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/vect/vect-over-widen-3-big-array.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
2 /* { dg-require-effective-target vect_shift } */ | 2 /* { dg-require-effective-target vect_shift } */ |
3 | 3 |
4 #include <stdarg.h> | 4 #include <stdarg.h> |
5 #include "tree-vect.h" | 5 #include "tree-vect.h" |
6 | 6 |
7 #define N 128 | 7 #define N VECTOR_BITS |
8 | 8 |
9 /* Modified rgb to rgb conversion from FFmpeg. */ | 9 /* Modified rgb to rgb conversion from FFmpeg. */ |
10 __attribute__ ((noinline)) void | 10 __attribute__ ((noinline)) void |
11 foo (unsigned char *src, unsigned char *dst) | 11 foo (unsigned char *src, unsigned char *dst) |
12 { | 12 { |
30 { | 30 { |
31 const int b = *s++; | 31 const int b = *s++; |
32 const int g = *s++; | 32 const int g = *s++; |
33 const int r = *s++; | 33 const int r = *s++; |
34 const int a = *s++; | 34 const int a = *s++; |
35 if (*d != ((b>>3) | ((g&0xFFC)<<3) | ((r+0xF8)>>8) | (a<<9))) | 35 unsigned short expected |
36 = ((b>>3) | ((g&0xFFC)<<3) | ((r+0xF8)>>8) | (a<<9)); | |
37 if (*d != expected) | |
36 abort (); | 38 abort (); |
37 d++; | 39 d++; |
38 } | 40 } |
39 } | 41 } |
40 | 42 |
55 foo (in, out); | 57 foo (in, out); |
56 | 58 |
57 return 0; | 59 return 0; |
58 } | 60 } |
59 | 61 |
60 /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 2 "vect" { target { ! vect_widen_shift } } } } */ | 62 /* { dg-final { scan-tree-dump {vect_recog_over_widening_pattern: detected:[^\n]* << 3} "vect" } } */ |
61 /* { dg-final { scan-tree-dump-times "vect_recog_over_widening_pattern: detected" 1 "vect" { target vect_widen_shift } } } */ | 63 /* { dg-final { scan-tree-dump {vect_recog_over_widening_pattern: detected:[^\n]* >> 3} "vect" } } */ |
64 /* { dg-final { scan-tree-dump {vect_recog_over_widening_pattern: detected:[^\n]* >> 8} "vect" } } */ | |
65 /* { dg-final { scan-tree-dump {vect_recog_over_widening_pattern: detected:[^\n]* << 9} "vect" } } */ | |
62 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ | 66 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ |
63 | 67 |