2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr38931.c
blobdd35dec75205f6ec5b47f2d7fce28ee4041159cc
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msse" } */
4 typedef int __m64 __attribute__ ((__vector_size__ (8)));
6 extern __m64 foo () ;
8 void bar (const int input_bpl, const unsigned char *input,
9 unsigned char *output, unsigned long x1)
11 unsigned char *pix_end_ptr = output + x1 * 4;
12 __m64 m_original = { 0, 0 };
13 __m64 m_base_addr = __builtin_ia32_vec_init_v2si (0, input_bpl);
14 __m64 m_addr = __builtin_ia32_paddd (m_original, m_base_addr);
15 __m64 *a0 = (__m64 *) input;
17 for (; output < pix_end_ptr; output += 4)
19 a0 = (__m64 *) (input + __builtin_ia32_vec_ext_v2si (m_addr, 0));
20 m_addr = foo ();
21 __builtin_prefetch (a0, 0);