diff options
author | Gabor Buella <gabor.buella@intel.com> | 2018-05-25 06:34:42 +0000 |
---|---|---|
committer | Gabor Buella <gabor.buella@intel.com> | 2018-05-25 06:34:42 +0000 |
commit | 078bb99a9057c261c172cbb74fc7794e0c601cb7 (patch) | |
tree | ecc46e560f5df280329fc00680d2581c9ae4779d /clang/test/CodeGen/invpcid.c | |
parent | d2f1ab1b1001d0ddf9ab227e1666ec9477e47eb9 (diff) | |
download | bcm5719-llvm-078bb99a9057c261c172cbb74fc7794e0c601cb7.tar.gz bcm5719-llvm-078bb99a9057c261c172cbb74fc7794e0c601cb7.zip |
[x86] invpcid intrinsic
An intrinsic for an old instruction, as described in the Intel SDM.
Reviewers: craig.topper, rnk
Reviewed By: craig.topper, rnk
Differential Revision: https://reviews.llvm.org/D47142
llvm-svn: 333256
Diffstat (limited to 'clang/test/CodeGen/invpcid.c')
-rw-r--r-- | clang/test/CodeGen/invpcid.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/invpcid.c b/clang/test/CodeGen/invpcid.c new file mode 100644 index 00000000000..f472cd99537 --- /dev/null +++ b/clang/test/CodeGen/invpcid.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +invpcid -emit-llvm -o - -Wall -Werror -pedantic | FileCheck %s +// RUN: %clang_cc1 %s -ffreestanding -triple=i386-unknown-unknown -target-feature +invpcid -emit-llvm -o - -Wall -Werror -pedantic | FileCheck %s + +#include <immintrin.h> + +#include <stdint.h> + +void test_invpcid(uint32_t type, void *descriptor) { + //CHECK-LABEL: @test_invpcid + //CHECK: call void @llvm.x86.invpcid(i32 %{{.*}}, i8* %{{.*}}) + _invpcid(type, descriptor); +} |