aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-02-08 19:45:08 +0000
committerCraig Topper <craig.topper@intel.com>2019-02-08 19:45:08 +0000
commitbe4cbe87268dc7962ca08b9af9b79b51cbdf69a0 (patch)
treee36eccb8b09f0f5506fcc751d95c1a6399d47966 /llvm/lib/Transforms
parent297b6a2b6ea68a0a5cda92c785abf292ac571683 (diff)
downloadllvm-be4cbe87268dc7962ca08b9af9b79b51cbdf69a0.zip
llvm-be4cbe87268dc7962ca08b9af9b79b51cbdf69a0.tar.gz
llvm-be4cbe87268dc7962ca08b9af9b79b51cbdf69a0.tar.bz2
[X86] Add explicit alignment to __m128/__m128i/__m128d/etc. to allow matching of MSVC behavior with #pragma pack.
Summary: With MSVC, #pragma pack is ignored when there is explicit alignment. This differs from gcc. Clang emulates this difference when compiling for Windows. It appears that MSVC and its headers consider the __m128/__m128i/__m128d/etc. types to be explicitly aligned and ignores #pragma pack for them. Since we don't have explicit alignment on them in our headers, we don't match the MSVC behavior here. This patch adds explicit alignment to match this behavior. I'm hoping this won't cause any problems when we're not emulating MSVC. But if someone knows of something that would be different we can swith to conditionally adding the alignment based on _MSC_VER. I had to add explicitly unaligned types as well so we could use them in the loadu/storeu intrinsics which use __attribute__(__packed__). Using the now explicitly aligned types wouldn't produce align 1 accesses when targeting Windows. Reviewers: rnk, erichkeane, spatel, RKSimon Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57961 llvm-svn: 353555
Diffstat (limited to 'llvm/lib/Transforms')
0 files changed, 0 insertions, 0 deletions