1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fno-ipa-icf" } */
8 __attribute__ ((noinline
)) void
9 foo (unsigned int *__restrict a
,
10 unsigned short *__restrict b
,
15 for (i
= 0; i
< n
; i
++)
18 for (i
= 0; i
< n
; i
++)
19 if (a
[i
] != b
[i
] * 2333)
23 __attribute__ ((noinline
)) void
24 bar (unsigned int *__restrict a
,
25 unsigned short *__restrict b
,
30 for (i
= 0; i
< n
; i
++)
31 a
[i
] = (unsigned short) 2333 * b
[i
];
33 for (i
= 0; i
< n
; i
++)
34 if (a
[i
] != b
[i
] * (unsigned short) 2333)
38 __attribute__ ((noinline
)) void
39 baz (unsigned int *__restrict a
,
40 unsigned short *__restrict b
,
45 for (i
= 0; i
< n
; i
++)
46 a
[i
] = b
[i
] * 233333333;
48 for (i
= 0; i
< n
; i
++)
49 if (a
[i
] != b
[i
] * 233333333)
62 for (i
= 0; i
< N
; i
++)
66 __asm__
volatile ("");
75 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { target vect_widen_mult_hi_to_si } } } */
76 /* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
77 /* { dg-final { scan-tree-dump-times "widen_mult pattern recognized" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */