Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr88531-2a.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -march=x86-64 -mfpmath=sse" } */
3
4 #include <stdint.h>
5
6 #define loop_t uint32_t
7 #define idx_t uint32_t
8
9 void loop(float * const __restrict__ dst,
10 float const * const __restrict__ src,
11 idx_t const * const __restrict__ idx,
12 loop_t const begin,
13 loop_t const end)
14 {
15 for (loop_t i = begin; i < end; ++i)
16 dst[i] = 42.0 * src[idx[i]];
17 }
18
19 /* For ia32 we do not consider V2SFmode vectorization. */
20 /* { dg-final { scan-assembler-times "mulps" 1 { target { ! ia32 } } } } */