From 514a8f89d01e063451e75be2a6c66a019c321502 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 17 Jan 2006 06:24:01 +0000 Subject: [PATCH] Ensure that the CFE always emits intrinsics in their unsigned version, not with signed operands llvm-svn: 25390 --- .../CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 llvm/test/Regression/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c diff --git a/llvm/test/Regression/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c b/llvm/test/Regression/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c new file mode 100644 index 000000000000..87909764ab94 --- /dev/null +++ b/llvm/test/Regression/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c @@ -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); +}