Ensure that the CFE always emits intrinsics in their unsigned version, not with signe...
authorChris Lattner <sabre@nondot.org>
Tue, 17 Jan 2006 06:24:01 +0000 (06:24 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 17 Jan 2006 06:24:01 +0000 (06:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25390 91177308-0d34-0410-b5e6-96231b3b80d8

test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c [new file with mode: 0644]

diff --git a/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c b/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c
new file mode 100644 (file)
index 0000000..8790976
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc -S %s -o - | grep 'llvm.ctlz.i32(uint' &&
+// RUN: %llvmgcc -S %s -o - | not grep 'llvm.ctlz.i32(int'
+
+unsigned t2(unsigned X) {
+  return __builtin_clz(X);
+}
+int t1(int X) {
+  return __builtin_clz(X);
+}