[PATCH] D21173: [X86] _MM_ALIGN16 attribute support for non-windows targets
Rackover, Zvi via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 9 11:36:25 PDT 2016
Thanks the suggestion, David. I did not realize __attribute__ is supported by Windows targets.
Zvi
From: David Majnemer [mailto:david.majnemer at gmail.com]
Sent: Thursday, June 09, 2016 17:48
To: reviews+D21173+public+9a6e31402e430422 at reviews.llvm.org; Rackover, Zvi <zvi.rackover at intel.com>
Cc: Aboud, Amjad <amjad.aboud at intel.com>; mkuper at google.com; echristo at gmail.com; cfe-commits at lists.llvm.org
Subject: Re: [PATCH] D21173: [X86] _MM_ALIGN16 attribute support for non-windows targets
On Thursday, June 9, 2016, Zvi Rackover via cfe-commits <cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>> wrote:
zvi created this revision.
zvi added reviewers: aaboud, mkuper, echristo, cfe-commits.
zvi set the repository for this revision to rL LLVM.
zvi added a project: clang-c.
Herald added a subscriber: mehdi_amini.
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
Repository:
rL LLVM
http://reviews.llvm.org/D21173
Files:
lib/Headers/xmmintrin.h
test/Headers/xmmintrin.c
Index: test/Headers/xmmintrin.c
===================================================================
--- test/Headers/xmmintrin.c
+++ test/Headers/xmmintrin.c
@@ -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.
Index: lib/Headers/xmmintrin.h
===================================================================
--- lib/Headers/xmmintrin.h
+++ lib/Headers/xmmintrin.h
@@ -2823,6 +2823,8 @@
#ifdef _MSC_VER
#define _MM_ALIGN16 __declspec(align(16))
+#else
+#define _MM_ALIGN16 __attribute__((aligned(16)))
#endif
I would just use the __attribute__ spelling, no need for two definitions
#define _MM_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160609/4501ffd6/attachment.html>
More information about the cfe-commits
mailing list