4 typedef signed char sc
;
5 typedef unsigned char uc
;
6 typedef signed short ss
;
7 typedef unsigned short us
;
9 typedef unsigned int ui
;
10 typedef signed long long sll
;
11 typedef unsigned long long ull
;
13 #define FOR_EACH_TYPE(M) \
20 #define TEST_VALUE(I) ((I) * 17 / 2)
22 #define ADD_TEST(TYPE) \
23 void __attribute__((noinline, noclone)) \
24 test_##TYPE (TYPE *a, TYPE *b) \
26 for (int i = 0; i < N; i += 2) \
35 #define DO_TEST(TYPE) \
36 for (int j = 0; j < M; ++j) \
39 for (int i = 0; i < N + M; ++i) \
40 a[i] = TEST_VALUE (i); \
41 test_##TYPE (a + j, a); \
42 _Pragma("GCC novector") \
43 for (int i = 0; i < N; i += 2) \
45 TYPE base1 = j == 0 ? TEST_VALUE (i) : a[i]; \
46 TYPE base2 = j <= 1 ? TEST_VALUE (i + 1) : a[i + 1]; \
47 if (a[i + j] != (TYPE) (base1 + 2) \
48 || a[i + j + 1] != (TYPE) (base2 + 3)) \
53 FOR_EACH_TYPE (ADD_TEST
)
58 FOR_EACH_TYPE (DO_TEST
)
62 /* { dg-final { scan-tree-dump {flags: *WAR\n} "vect" { target vect_int } } } */
63 /* { dg-final { scan-tree-dump-not {flags: [^\n]*ARBITRARY\n} "vect" } } */
64 /* { dg-final { scan-tree-dump "using an address-based WAR/WAW test" "vect" { target { ! vect_check_ptrs } } } } */
65 /* { dg-final { scan-tree-dump "using an IFN_CHECK_WAR_PTRS test" "vect" { target vect_check_ptrs } } } */
66 /* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */