r273095 - [X86] _MM_ALIGN16 attribute support for non-windows targets
Zvi Rackover via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 18 13:01:07 PDT 2016
Author: zvi
Date: Sat Jun 18 15:01:07 2016
New Revision: 273095
URL: http://llvm.org/viewvc/llvm-project?rev=273095&view=rev
Log:
[X86] _MM_ALIGN16 attribute support for non-windows targets
Summary:
This patch adds support for the _MM_ALIGN16 attribute on non-windows targets. This aligns Clang with ICC which supports the attribute on all targets.
Fixes PR28056
Reviewers: aaboud, echristo, cfe-commits, mkuper
Subscribers: zvi, mehdi_amini
Projects: #clang-c
Differential Revision: http://reviews.llvm.org/D21173
Modified:
cfe/trunk/lib/Headers/xmmintrin.h
cfe/trunk/test/Headers/xmmintrin.c
Modified: cfe/trunk/lib/Headers/xmmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.h?rev=273095&r1=273094&r2=273095&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/xmmintrin.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.h Sat Jun 18 15:01:07 2016
@@ -2821,9 +2821,7 @@ _mm_movemask_ps(__m128 __a)
}
-#ifdef _MSC_VER
-#define _MM_ALIGN16 __declspec(align(16))
-#endif
+#define _MM_ALIGN16 __attribute__((aligned(16)))
#define _MM_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
Modified: cfe/trunk/test/Headers/xmmintrin.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/xmmintrin.c?rev=273095&r1=273094&r2=273095&view=diff
==============================================================================
--- cfe/trunk/test/Headers/xmmintrin.c (original)
+++ cfe/trunk/test/Headers/xmmintrin.c Sat Jun 18 15:01:07 2016
@@ -7,6 +7,9 @@
// REQUIRES: x86-registered-target
#include <xmmintrin.h>
+// CHECK: @c = common global i8 0, align 16
+_MM_ALIGN16 char c;
+
// Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by
// checking that clang emits PACKSSDW instead of PACKSSWB.
More information about the cfe-commits
mailing list