1 /* { dg-require-effective-target vect_int } */
7 extern void abort (void);
8 typedef unsigned char T
;
11 testmax (const T
*c
, T init
, T result
)
13 T lc
[N
], accum
= init
;
16 __builtin_memcpy (lc
, c
, sizeof(lc
));
18 for (i
= 0; i
< N
; i
++) {
19 accum
= accum
< lc
[i
] ? lc
[i
] : accum
;
27 testmin (const T
*c
, T init
, T result
)
29 T lc
[N
], accum
= init
;
32 __builtin_memcpy (lc
, c
, sizeof(lc
));
34 for (i
= 0; i
< N
; i
++) {
35 accum
= accum
> lc
[i
] ? lc
[i
] : accum
;
44 static unsigned char const A
[N
] = {
45 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
46 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
47 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
48 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f
51 static unsigned char const B
[N
] = {
52 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
53 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
54 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
55 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f
58 static unsigned char const C
[N
] = {
59 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
60 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
61 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
62 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
68 testmin (B
, 0x7f, 0x70);
69 testmin (C
, 0x7f, 0x09);
78 /* { dg-final { cleanup-tree-dump "vect" } } */