1 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-O2 -msse" } */
7 #include "../../gcc.dg/i386-cpuid.h"
15 const char test [] = "This is a test.";
16 unsigned long cpu_facilities;
18 cpu_facilities = i386_cpuid ();
20 if ((cpu_facilities & bit_SSE) != bit_SSE )
21 /* If host has no vector support, pass. */
24 for (alignment = 1; alignment <= (1 << 20); alignment += alignment)
26 ptr = _mm_malloc (alignment, alignment);
27 if (((ptrdiff_t) ptr) & (alignment - 1))
31 n = alignment > sizeof test ? sizeof test : alignment;
32 memcpy (ptr, test, n);
33 if (memcmp (ptr, test, n) != 0)