aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Generic/llvm-ct-intrinsics.ll
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-02-19 01:41:04 +0000
committerTanya Lattner <tonic@nondot.org>2008-02-19 01:41:04 +0000
commitf28e0cef0dadea1c4149df3ade98915b4ded37f9 (patch)
tree896c6dee3a55f268ea98656237c7954799fd8ec7 /test/CodeGen/Generic/llvm-ct-intrinsics.ll
parentd1045a634ff2156c6666ad36c747a265c1d902ee (diff)
downloadexternal_llvm-f28e0cef0dadea1c4149df3ade98915b4ded37f9.zip
external_llvm-f28e0cef0dadea1c4149df3ade98915b4ded37f9.tar.gz
external_llvm-f28e0cef0dadea1c4149df3ade98915b4ded37f9.tar.bz2
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic/llvm-ct-intrinsics.ll')
-rw-r--r--test/CodeGen/Generic/llvm-ct-intrinsics.ll103
1 files changed, 53 insertions, 50 deletions
diff --git a/test/CodeGen/Generic/llvm-ct-intrinsics.ll b/test/CodeGen/Generic/llvm-ct-intrinsics.ll
index 014d261..66f409e 100644
--- a/test/CodeGen/Generic/llvm-ct-intrinsics.ll
+++ b/test/CodeGen/Generic/llvm-ct-intrinsics.ll
@@ -1,59 +1,62 @@
; Make sure this testcase is supported by all code generators
-; RUN: llvm-upgrade < %s | llvm-as | llc
-
-declare ulong %llvm.ctpop.i64(ulong)
-declare uint %llvm.ctpop.i32(uint)
-declare ushort %llvm.ctpop.i16(ushort)
-declare ubyte %llvm.ctpop.i8(ubyte)
-
-void %ctpoptest(ubyte %A, ushort %B, uint %C, ulong %D,
- ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
- %a = call ubyte %llvm.ctpop.i8(ubyte %A)
- %b = call ushort %llvm.ctpop.i16(ushort %B)
- %c = call uint %llvm.ctpop.i32(uint %C)
- %d = call ulong %llvm.ctpop.i64(ulong %D)
-
- store ubyte %a, ubyte* %AP
- store ushort %b, ushort* %BP
- store uint %c, uint* %CP
- store ulong %d, ulong* %DP
+; RUN: llvm-as < %s | llc
+
+declare i64 @llvm.ctpop.i64(i64)
+
+declare i32 @llvm.ctpop.i32(i32)
+
+declare i16 @llvm.ctpop.i16(i16)
+
+declare i8 @llvm.ctpop.i8(i8)
+
+define void @ctpoptest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
+ %a = call i8 @llvm.ctpop.i8( i8 %A ) ; <i8> [#uses=1]
+ %b = call i16 @llvm.ctpop.i16( i16 %B ) ; <i16> [#uses=1]
+ %c = call i32 @llvm.ctpop.i32( i32 %C ) ; <i32> [#uses=1]
+ %d = call i64 @llvm.ctpop.i64( i64 %D ) ; <i64> [#uses=1]
+ store i8 %a, i8* %AP
+ store i16 %b, i16* %BP
+ store i32 %c, i32* %CP
+ store i64 %d, i64* %DP
ret void
}
-declare ulong %llvm.ctlz.i64(ulong)
-declare uint %llvm.ctlz.i32(uint)
-declare ushort %llvm.ctlz.i16(ushort)
-declare ubyte %llvm.ctlz.i8(ubyte)
-
-void %ctlztest(ubyte %A, ushort %B, uint %C, ulong %D,
- ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
- %a = call ubyte %llvm.ctlz.i8(ubyte %A)
- %b = call ushort %llvm.ctlz.i16(ushort %B)
- %c = call uint %llvm.ctlz.i32(uint %C)
- %d = call ulong %llvm.ctlz.i64(ulong %D)
-
- store ubyte %a, ubyte* %AP
- store ushort %b, ushort* %BP
- store uint %c, uint* %CP
- store ulong %d, ulong* %DP
+declare i64 @llvm.ctlz.i64(i64)
+
+declare i32 @llvm.ctlz.i32(i32)
+
+declare i16 @llvm.ctlz.i16(i16)
+
+declare i8 @llvm.ctlz.i8(i8)
+
+define void @ctlztest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
+ %a = call i8 @llvm.ctlz.i8( i8 %A ) ; <i8> [#uses=1]
+ %b = call i16 @llvm.ctlz.i16( i16 %B ) ; <i16> [#uses=1]
+ %c = call i32 @llvm.ctlz.i32( i32 %C ) ; <i32> [#uses=1]
+ %d = call i64 @llvm.ctlz.i64( i64 %D ) ; <i64> [#uses=1]
+ store i8 %a, i8* %AP
+ store i16 %b, i16* %BP
+ store i32 %c, i32* %CP
+ store i64 %d, i64* %DP
ret void
}
-declare ulong %llvm.cttz.i64(ulong)
-declare uint %llvm.cttz.i32(uint)
-declare ushort %llvm.cttz.i16(ushort)
-declare ubyte %llvm.cttz.i8(ubyte)
-
-void %cttztest(ubyte %A, ushort %B, uint %C, ulong %D,
- ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
- %a = call ubyte %llvm.cttz.i8(ubyte %A)
- %b = call ushort %llvm.cttz.i16(ushort %B)
- %c = call uint %llvm.cttz.i32(uint %C)
- %d = call ulong %llvm.cttz.i64(ulong %D)
-
- store ubyte %a, ubyte* %AP
- store ushort %b, ushort* %BP
- store uint %c, uint* %CP
- store ulong %d, ulong* %DP
+declare i64 @llvm.cttz.i64(i64)
+
+declare i32 @llvm.cttz.i32(i32)
+
+declare i16 @llvm.cttz.i16(i16)
+
+declare i8 @llvm.cttz.i8(i8)
+
+define void @cttztest(i8 %A, i16 %B, i32 %C, i64 %D, i8* %AP, i16* %BP, i32* %CP, i64* %DP) {
+ %a = call i8 @llvm.cttz.i8( i8 %A ) ; <i8> [#uses=1]
+ %b = call i16 @llvm.cttz.i16( i16 %B ) ; <i16> [#uses=1]
+ %c = call i32 @llvm.cttz.i32( i32 %C ) ; <i32> [#uses=1]
+ %d = call i64 @llvm.cttz.i64( i64 %D ) ; <i64> [#uses=1]
+ store i8 %a, i8* %AP
+ store i16 %b, i16* %BP
+ store i32 %c, i32* %CP
+ store i64 %d, i64* %DP
ret void
}