From 478cc13bdb1294672728140022d3e7d7b9067ab9 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25390 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/CFrontend/2006-01-16-BitCountIntrinsicsUnsigned.c 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); +} -- 2.34.1