[X86] Add the movbe instruction intrinsics from icc.
authorCraig Topper <craig.topper@intel.com>
Fri, 28 Sep 2018 17:09:51 +0000 (17:09 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 28 Sep 2018 17:09:51 +0000 (17:09 +0000)
commit6ad92200672de5a47588a828f6b21a071c0d1dcb
tree23b7d96cda9af0e73dee29e7153a05dd4e5768dd
parentcea130b0e01ce30c97d5a929857623108333e869
[X86] Add the movbe instruction intrinsics from icc.

These intrinsics exist in icc. They can be found on the Intel Intrinsics Guide website.

All the backend support is in place to pattern match a load+bswap or a bswap+store pattern to the MOVBE instructions. So we just need to get the frontend to emit the correct IR. The pointer arguments in icc are declared as void so I had to jump through a packed struct to forcing a specific alignment on the load/store. Same trick we use in the unaligned vector load/store intrinsics

Differential Revision: https://reviews.llvm.org/D52586

llvm-svn: 343343
clang/lib/Basic/Targets/X86.cpp
clang/lib/Headers/immintrin.h
clang/test/CodeGen/movbe-builtins.c [new file with mode: 0644]
clang/test/Preprocessor/predefined-arch-macros.c