Testcase for llvm.c* intrinsic failures.
authorBill Wendling <isanbard@gmail.com>
Wed, 22 Aug 2007 07:26:30 +0000 (07:26 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 22 Aug 2007 07:26:30 +0000 (07:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41268 91177308-0d34-0410-b5e6-96231b3b80d8

test/CFrontend/2007-08-22-CTTZ.c [new file with mode: 0644]

diff --git a/test/CFrontend/2007-08-22-CTTZ.c b/test/CFrontend/2007-08-22-CTTZ.c
new file mode 100644 (file)
index 0000000..8687a73
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %llvmgcc -O2 -S -o - -emit-llvm %s | grep {llvm.cttz.i64} | count 1
+// RUN: %llvmgcc -O2 -S -o - -emit-llvm %s | not grep {lshr}
+
+int bork(unsigned long long x) {
+  return __builtin_ctzll(x);
+}