summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/builtin-clzero.c
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-02-09 06:10:14 +0000
committerCraig Topper <craig.topper@gmail.com>2017-02-09 06:10:14 +0000
commit4574226c3fb431865165a574d69fecd6f254d105 (patch)
tree1b028ffc087914db815d52f9000559bc6ba6b5b1 /clang/test/CodeGen/builtin-clzero.c
parent50f3d1452c2adc16af219879fa1ff2ad8a514af0 (diff)
downloadbcm5719-llvm-4574226c3fb431865165a574d69fecd6f254d105.tar.gz
bcm5719-llvm-4574226c3fb431865165a574d69fecd6f254d105.zip
[X86] Clzero flag addition and inclusion under znver1
1. Adds the command line flag for clzero. 2. Includes the clzero flag under znver1. 3. Defines the macro for clzero. 4. Adds a new file which has the intrinsic definition for clzero instruction. Patch by Ganesh Gopalasubramanian with some additional tests from me. Differential revision: https://reviews.llvm.org/D29386 llvm-svn: 294559
Diffstat (limited to 'clang/test/CodeGen/builtin-clzero.c')
-rw-r--r--clang/test/CodeGen/builtin-clzero.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtin-clzero.c b/clang/test/CodeGen/builtin-clzero.c
new file mode 100644
index 00000000000..4e91129a20c
--- /dev/null
+++ b/clang/test/CodeGen/builtin-clzero.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +clzero -emit-llvm -o - -Wall -Werror | FileCheck %s
+#define __MM_MALLOC_H
+
+#include <x86intrin.h>
+void test_mm_clzero(void * __m) {
+ //CHECK-LABEL: @test_mm_clzero
+ //CHECK: @llvm.x86.clflushopt
+ _mm_clzero(__m);
+}
OpenPOWER on IntegriCloud