From: Chris Lattner Date: Tue, 17 Jan 2006 06:24:01 +0000 (+0000) Subject: Ensure that the CFE always emits intrinsics in their unsigned version, not with signe... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=478cc13bdb1294672728140022d3e7d7b9067ab9;p=oota-llvm.git Ensure that the CFE always emits intrinsics in their unsigned version, not with signed operands git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25390 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c b/test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c new file mode 100644 index 00000000000..87909764ab9 --- /dev/null +++ b/test/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); +}