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 "-mlasx" { target loongarch*-*-* } } */
16 __attribute__ ((noinline
)) void
21 for (i
= 0; i
< N
/2; i
++)
23 out
[2*i
] = in
[2*i
] * COEF
;
24 out2
[2*i
] = in
[2*i
] + COEF2
;
25 out
[2*i
+1] = in
[2*i
+1] * COEF
;
26 out2
[2*i
+1] = in
[2*i
+1] + COEF2
;
36 for (i
= 0; i
< N
; i
++)
39 __asm__
volatile ("");
45 for (i
= 0; i
< N
; i
++)
46 if (out
[i
] != in
[i
] * COEF
|| out2
[i
] != in
[i
] + COEF2
)
52 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_hi_to_si } } } */
53 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target vect_widen_mult_hi_to_si } } } */
54 /* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
55 /* { dg-final { scan-tree-dump-times "pattern recognized" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */