[committed][RISC-V] Fix test expectations after recent late-combine changes
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-bitfield-read-7.c
blob6d1043dd9710a51d9b55806f0e91377140ba9af8
1 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-require-effective-target vect_shift } */
5 #include <stdarg.h>
6 #include "tree-vect.h"
8 extern void abort(void);
10 struct s {
11 unsigned i : 8;
12 char a : 4;
15 #define N 32
16 #define ELT0 {0xFUL, 0}
17 #define ELT1 {0xFUL, 1}
18 #define ELT2 {0xFUL, 2}
19 #define ELT3 {0xFUL, 3}
20 #define RES 48
21 struct s A[N]
22 = { ELT0, ELT1, ELT2, ELT3, ELT0, ELT1, ELT2, ELT3,
23 ELT0, ELT1, ELT2, ELT3, ELT0, ELT1, ELT2, ELT3,
24 ELT0, ELT1, ELT2, ELT3, ELT0, ELT1, ELT2, ELT3,
25 ELT0, ELT1, ELT2, ELT3, ELT0, ELT1, ELT2, ELT3};
27 int __attribute__ ((noipa))
28 f(struct s *ptr, unsigned n) {
29 int res = 0;
30 for (int i = 0; i < n; ++i)
31 res += ptr[i].a;
32 return res;
35 int main (void)
37 check_vect ();
39 if (f(&A[0], N) != RES)
40 abort ();
42 return 0;
45 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
46 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */