Skip to content
Snippets Groups Projects
Commit 56545d20 authored by Zvi Rackover's avatar Zvi Rackover
Browse files

[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273095 91177308-0d34-0410-b5e6-96231b3b80d8
parent d6bd2e8e
No related branches found
No related tags found
No related merge requests found
...@@ -2821,9 +2821,7 @@ _mm_movemask_ps(__m128 __a) ...@@ -2821,9 +2821,7 @@ _mm_movemask_ps(__m128 __a)
} }
#ifdef _MSC_VER #define _MM_ALIGN16 __attribute__((aligned(16)))
#define _MM_ALIGN16 __declspec(align(16))
#endif
#define _MM_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w)) #define _MM_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
// REQUIRES: x86-registered-target // REQUIRES: x86-registered-target
#include <xmmintrin.h> #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 // 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. // checking that clang emits PACKSSDW instead of PACKSSWB.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment