aboutsummaryrefslogtreecommitdiffstats
path: root/test/Feature/intrinsics.ll
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-01-19 01:17:06 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-01-19 01:17:06 +0000
commitfd57ad787ff49e65ae2dbb1ecc0a88e1e3f6b736 (patch)
tree5466ee9e82638e01753b949388e84b1ac63c1111 /test/Feature/intrinsics.ll
parent727552bb899688f9fc473651bef67d4105597b8f (diff)
downloadexternal_llvm-fd57ad787ff49e65ae2dbb1ecc0a88e1e3f6b736.zip
external_llvm-fd57ad787ff49e65ae2dbb1ecc0a88e1e3f6b736.tar.gz
external_llvm-fd57ad787ff49e65ae2dbb1ecc0a88e1e3f6b736.tar.bz2
Expand test to cover the non-overloaded variants of the arithmetic and
floating point intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Feature/intrinsics.ll')
-rw-r--r--test/Feature/intrinsics.ll46
1 files changed, 45 insertions, 1 deletions
diff --git a/test/Feature/intrinsics.ll b/test/Feature/intrinsics.ll
index 973e82f..6733e37 100644
--- a/test/Feature/intrinsics.ll
+++ b/test/Feature/intrinsics.ll
@@ -5,12 +5,33 @@
declare bool %llvm.isunordered(float, float)
declare bool %llvm.isunordered(double, double)
+declare bool %llvm.isunordered.f32(float,float)
+declare bool %llvm.isunordered.f64(double,double)
declare void %llvm.prefetch(sbyte*, uint, uint)
declare uint %llvm.ctpop(uint)
+declare ubyte %llvm.ctpop.i8(ubyte)
+declare ushort %llvm.ctpop.i16(ushort)
+declare uint %llvm.ctpop.i32(uint)
+declare ulong %llvm.ctpop.i64(ulong)
+
declare ushort %llvm.cttz(ushort)
+declare ubyte %llvm.cttz.i8(ubyte)
+declare ushort %llvm.cttz.i16(ushort)
+declare uint %llvm.cttz.i32(uint)
+declare ulong %llvm.cttz.i64(ulong)
+
declare ulong %llvm.ctlz(ulong)
+declare ubyte %llvm.ctlz.i8(ubyte)
+declare ushort %llvm.ctlz.i16(ushort)
+declare uint %llvm.ctlz.i32(uint)
+declare ulong %llvm.ctlz.i64(ulong)
+
+declare float %llvm.sqrt(float)
+declare double %llvm.sqrt(double)
+declare float %llvm.sqrt.f32(float)
+declare double %llvm.sqrt.f64(double)
implementation
@@ -19,10 +40,33 @@ implementation
void %libm() {
call bool %llvm.isunordered(float 0.0, float 1.0)
call bool %llvm.isunordered(double 0.0, double 0x7FF8000000000000)
+ call bool %llvm.isunordered.f32(float 1.0, float 2.0)
+ call bool %llvm.isunordered.f64(double 3.0, double 4.0)
+
call void %llvm.prefetch(sbyte* null, uint 1, uint 3)
+
+ call float %llvm.sqrt(float 4.0)
+ call double %llvm.sqrt(double 4.0)
+ call float %llvm.sqrt.f32(float 5.0)
+ call double %llvm.sqrt.f64(double 6.0)
+
call uint %llvm.ctpop(uint 3)
- call ushort %llvm.cttz(ushort 7)
+ call ubyte %llvm.ctpop.i8(ubyte 10)
+ call ushort %llvm.ctpop.i16(ushort 11)
+ call uint %llvm.ctpop.i32(uint 12)
+ call ulong %llvm.ctpop.i64(ulong 13)
+
call ulong %llvm.ctlz(ulong 65000)
+ call ubyte %llvm.ctlz.i8(ubyte 14)
+ call ushort %llvm.ctlz.i16(ushort 15)
+ call uint %llvm.ctlz.i32(uint 16)
+ call ulong %llvm.ctlz.i64(ulong 17)
+
+ call ushort %llvm.cttz(ushort 7)
+ call ubyte %llvm.cttz.i8(ubyte 18)
+ call ushort %llvm.cttz.i16(ushort 19)
+ call uint %llvm.cttz.i32(uint 20)
+ call ulong %llvm.cttz.i64(ulong 21)
ret void
}