AVR: target/116953 - ICE due to operands clobber in avr_out_sbxx_branch.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / tsvc / vect-tsvc-s4116.c
blob95a771ec0d1be9b9993358c82f16c472d0c5a6b3
1 /* This file is distributed under the University of Illinois Open Source
2 License. See license.txt for details. */
4 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
5 /* { dg-require-effective-target vect_float } */
7 #include "tsvc.h"
9 real_t s4116(struct args_t * func_args)
11 // indirect addressing
12 // more complicated sparse sdot
13 // gather is required
15 struct{int * __restrict__ a;int b;int c;} * x = func_args->arg_info;
16 int * __restrict__ ip = x->a;
17 int j = x->b;
18 int inc = x->c;
20 initialise_arrays(__func__);
22 real_t sum;
23 int off;
24 for (int nl = 0; nl < 100*iterations; nl++) {
25 sum = 0.;
26 for (int i = 0; i < LEN_2D-1; i++) {
27 off = inc + i;
28 sum += a[off] * aa[j-1][ip[i]];
30 dummy(a, b, c, d, e, aa, bb, cc, 0.);
33 return sum;
36 int main (int argc, char **argv)
38 int n1 = 1;
39 int n3 = 1;
40 int* ip;
41 real_t s1,s2;
42 init(&ip, &s1, &s2);
44 run(&s4116, "s4116", &(struct{int * a; int b; int c;}){ip, LEN_2D/2, n1});
46 return 0;
49 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */