| 1 |
/* This file is distributed under the University of Illinois Open Source |
| 2 |
License. See license.txt for details. */ |
| 3 |
|
| 4 |
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */ |
| 5 |
/* { dg-require-effective-target vect_float } */ |
| 6 |
|
| 7 |
#include "tsvc.h" |
| 8 |
|
| 9 |
real_t s442(struct args_t * func_args) |
| 10 |
{ |
| 11 |
// non-logical if's |
| 12 |
// computed goto |
| 13 |
|
| 14 |
initialise_arrays(__func__); |
| 15 |
|
| 16 |
for (int nl = 0; nl < iterations/2; nl++) { |
| 17 |
for (int i = 0; i < LEN_1D; i++) { |
| 18 |
switch (indx[i]) { |
| 19 |
case 1: goto L15; |
| 20 |
case 2: goto L20; |
| 21 |
case 3: goto L30; |
| 22 |
case 4: goto L40; |
| 23 |
} |
| 24 |
L15: |
| 25 |
a[i] += b[i] * b[i]; |
| 26 |
goto L50; |
| 27 |
L20: |
| 28 |
a[i] += c[i] * c[i]; |
| 29 |
goto L50; |
| 30 |
L30: |
| 31 |
a[i] += d[i] * d[i]; |
| 32 |
goto L50; |
| 33 |
L40: |
| 34 |
a[i] += e[i] * e[i]; |
| 35 |
L50: |
| 36 |
; |
| 37 |
} |
| 38 |
dummy(a, b, c, d, e, aa, bb, cc, 0.); |
| 39 |
} |
| 40 |
|
| 41 |
return calc_checksum(__func__); |
| 42 |
} |
| 43 |
|
| 44 |
int main (int argc, char **argv) |
| 45 |
{ |
| 46 |
int n1 = 1; |
| 47 |
int n3 = 1; |
| 48 |
int* ip; |
| 49 |
real_t s1,s2; |
| 50 |
init(&ip, &s1, &s2); |
| 51 |
|
| 52 |
run(&s442, "s442", NULL); |
| 53 |
|
| 54 |
return 0; |
| 55 |
} |
| 56 |
|
| 57 |
/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */ |