cfgexpand: Expand comment on when non-var clobbers can show up
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-widen-mult-half.c
blobb69ade338862cda4f44f5206d195eef1cb5e8d36
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*-*-* } } */
6 #include "tree-vect.h"
8 #define N 32
9 #define COEF 32470
10 #define COEF2 324700
12 unsigned char in[N];
13 int out[N];
14 int out2[N];
16 __attribute__ ((noinline)) void
17 foo ()
19 int i;
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;
30 int main (void)
32 int i;
34 check_vect ();
36 for (i = 0; i < N; i++)
38 in[i] = i;
39 __asm__ volatile ("");
42 foo ();
44 #pragma GCC novector
45 for (i = 0; i < N; i++)
46 if (out[i] != in[i] * COEF || out2[i] != in[i] + COEF2)
47 abort ();
49 return 0;
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 } } } */