+2016-07-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/71734
+ * g++.dg/vect/pr70729.cc: Don't include string.h or xmmintrin.h.
+ (my_alloc): Rewritten to use __builtin_posix_memalign and
+ __SIZE_TYPE__.
+ (my_free): Use __builtin_free instead of _mm_free.
+ (Vec::operator=): Use __builtin_memcpy.
+
2016-07-19 Martin Jambor <mjambor@suse.cz>
PR fortran/71688
// { dg-additional-options "-ffast-math -fopenmp-simd" }
// { dg-additional-options "-msse2" { target x86_64-*-* i?86-*-* } }
-
-#include <string.h>
-#include <xmmintrin.h>
-
-inline void* my_alloc (size_t bytes) {return _mm_malloc (bytes, 128);}
-inline void my_free (void* memory) {_mm_free (memory);}
+inline void* my_alloc (__SIZE_TYPE__ bytes) {void *ptr; __builtin_posix_memalign (&ptr, bytes, 128);}
+inline void my_free (void* memory) {__builtin_free (memory);}
template <typename T>
class Vec
Vec& operator = (const Vec& other)
{
if (this != &other)
- memcpy (data, other.data, isize*sizeof (T));
+ __builtin_memcpy (data, other.data, isize*sizeof (T));
return *this;
}