| 1 |
/* Disabling epilogues until we find a better way to deal with scans. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-additional-options "--param vect-epilogues-nomask=0 -fdump-tree-optimized" } */ |
| 4 |
/* { dg-require-effective-target vect_int } */ |
| 5 |
/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ |
| 6 |
/* { dg-add-options arm_v8_2a_dotprod_neon } */ |
| 7 |
|
| 8 |
#include "tree-vect.h" |
| 9 |
|
| 10 |
#ifndef SIGNEDNESS_1 |
| 11 |
#define SIGNEDNESS_1 signed |
| 12 |
#define SIGNEDNESS_2 signed |
| 13 |
#endif |
| 14 |
|
| 15 |
SIGNEDNESS_1 int __attribute__ ((noipa)) |
| 16 |
f (SIGNEDNESS_1 int res0, |
| 17 |
SIGNEDNESS_1 int res1, |
| 18 |
SIGNEDNESS_1 int res2, |
| 19 |
SIGNEDNESS_1 int res3, |
| 20 |
SIGNEDNESS_1 int res4, |
| 21 |
SIGNEDNESS_1 int res5, |
| 22 |
SIGNEDNESS_1 int res6, |
| 23 |
SIGNEDNESS_1 int res7, |
| 24 |
SIGNEDNESS_1 int res8, |
| 25 |
SIGNEDNESS_1 int res9, |
| 26 |
SIGNEDNESS_1 int resA, |
| 27 |
SIGNEDNESS_1 int resB, |
| 28 |
SIGNEDNESS_1 int resC, |
| 29 |
SIGNEDNESS_1 int resD, |
| 30 |
SIGNEDNESS_1 int resE, |
| 31 |
SIGNEDNESS_1 int resF, |
| 32 |
SIGNEDNESS_2 char *a, |
| 33 |
SIGNEDNESS_2 char *b) |
| 34 |
{ |
| 35 |
for (int i = 0; i < 64; i += 16) |
| 36 |
{ |
| 37 |
res0 += a[i + 0x00] * b[i + 0x00]; |
| 38 |
res1 += a[i + 0x01] * b[i + 0x01]; |
| 39 |
res2 += a[i + 0x02] * b[i + 0x02]; |
| 40 |
res3 += a[i + 0x03] * b[i + 0x03]; |
| 41 |
res4 += a[i + 0x04] * b[i + 0x04]; |
| 42 |
res5 += a[i + 0x05] * b[i + 0x05]; |
| 43 |
res6 += a[i + 0x06] * b[i + 0x06]; |
| 44 |
res7 += a[i + 0x07] * b[i + 0x07]; |
| 45 |
res8 += a[i + 0x08] * b[i + 0x08]; |
| 46 |
res9 += a[i + 0x09] * b[i + 0x09]; |
| 47 |
resA += a[i + 0x0A] * b[i + 0x0A]; |
| 48 |
resB += a[i + 0x0B] * b[i + 0x0B]; |
| 49 |
resC += a[i + 0x0C] * b[i + 0x0C]; |
| 50 |
resD += a[i + 0x0D] * b[i + 0x0D]; |
| 51 |
resE += a[i + 0x0E] * b[i + 0x0E]; |
| 52 |
resF += a[i + 0x0F] * b[i + 0x0F]; |
| 53 |
} |
| 54 |
|
| 55 |
return res0 ^ res1 ^ res2 ^ res3 ^ res4 ^ res5 ^ res6 ^ res7 ^ |
| 56 |
res8 ^ res9 ^ resA ^ resB ^ resC ^ resD ^ resE ^ resF; |
| 57 |
} |
| 58 |
|
| 59 |
/* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ |
| 60 |
/* { dg-final { scan-tree-dump-not "DOT_PROD_EXPR" "optimized" } } */ |