[committed][RISC-V] Fix test expectations after recent late-combine changes
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-shift-5.c
blobe47797f3366fd52d48141c2dfd2691e1a4e9f26e
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_shift } */
3 /* { dg-require-effective-target vect_int } */
5 typedef unsigned int uint32_t;
6 typedef short unsigned int uint16_t;
8 int foo (uint32_t arr[4][4])
10 int sum = 0;
11 for(int i = 0; i < 4; i++)
13 sum += ((arr[0][i] >> 10) * 20) + ((arr[1][i] >> 11) & 53)
14 + ((arr[2][i] >> 12) * 7) + ((arr[3][i] >> 13) ^ 43);
16 return (((uint16_t)sum) + ((uint32_t)sum >> 16)) >> 1;
19 /* For a target that has a vector/scalar shift/rotate optab, check
20 that we are not adding the cost of creating a vector from the scalar
21 in the prologue. */
22 /* { dg-final { scan-tree-dump {vectorizable_shift ===[\n\r][^\n]*prologue_cost = 0} "vect" { target { aarch64*-*-* x86_64-*-* } } } } */