1 /* { dg-require-effective-target vect_int } */
8 #define SIGNEDNESS_1 unsigned
9 #define SIGNEDNESS_2 signed
12 void __attribute__ ((noipa
))
13 f (SIGNEDNESS_1
short *restrict a
, SIGNEDNESS_2
char *restrict b
,
14 SIGNEDNESS_2
char *restrict c
)
16 for (__INTPTR_TYPE__ i
= 0; i
< N
; ++i
)
18 int bv
= (SIGNEDNESS_2
char) b
[i
];
19 int cv
= (SIGNEDNESS_2
char) c
[i
];
24 #define BASE ((SIGNEDNESS_2 int) -1 < 0 ? -126 : 4)
32 SIGNEDNESS_1
short a
[N
];
33 SIGNEDNESS_2
char b
[N
], c
[N
];
34 for (int i
= 0; i
< N
; ++i
)
37 c
[i
] = BASE
+ OFFSET
+ i
* 4;
38 asm volatile ("" ::: "memory");
41 for (int i
= 0; i
< N
; ++i
)
42 if (a
[i
] != (SIGNEDNESS_1
short) ((BASE
+ i
* 5)
43 * (BASE
+ OFFSET
+ i
* 4)))
47 /* { dg-final { scan-tree-dump "vect_recog_widen_mult_pattern: detected" "vect" } } */
48 /* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_widen_mult_qi_to_hi } } } */