1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
3 /* { dg-require-effective-target vect_int } */
4 /* { dg-additional-options "-fno-ipa-icf" } */
5 /* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */
11 __attribute__ ((noinline
)) void
12 foo (int *__restrict a
,
18 for (i
= 0; i
< n
; i
++)
22 for (i
= 0; i
< n
; i
++)
23 if (a
[i
] != b
[i
] * 2333)
27 __attribute__ ((noinline
)) void
28 bar (int *__restrict a
,
34 for (i
= 0; i
< n
; i
++)
35 a
[i
] = b
[i
] * (short) 2333;
38 for (i
= 0; i
< n
; i
++)
39 if (a
[i
] != b
[i
] * (short) 2333)
51 for (i
= 0; i
< N
; i
++)
55 __asm__
volatile ("");
63 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_widen_mult_hi_to_si } } } */
64 /* { dg-final { scan-tree-dump-times {vect_recog_widen_mult_pattern: detected:[^\n]* 2333} 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
65 /* { dg-final { scan-tree-dump-times {widen_mult pattern recognized:[^\n]* 2333} 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */