gcc/testsuite/gcc.target/aarch64/pr110625_2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-Ofast -mcpu=neoverse-n2 -fdump-tree-vect-details -fno-tree-slp-vectorize" } */ |
| 3 | /* { dg-final { scan-tree-dump "reduction latency = 8" "vect" } } */ |
| 4 | |
| 5 | /* The reduction latency should be multiplied by the count for |
| 6 | single_defuse_cycle. */ |
| 7 | |
| 8 | long |
| 9 | f (long res, short *ptr1, short *ptr2, int n) |
| 10 | { |
| 11 | for (int i = 0; i < n; ++i) |
| 12 | res += (long) ptr1[i] << ptr2[i]; |
| 13 | return res; |
| 14 | } |