diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-03-01 07:38:40 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-03-01 07:38:40 +0000 |
commit | b7e02fc0bf18ec1d026291aab48d125a455b3ec5 (patch) | |
tree | c8363a654a595a92d7917b036128aa4555ab1c56 /llvm/test/Feature/intrinsics.ll | |
parent | bb2090018474648c03f16b5db8b7cf8987fcb9ed (diff) | |
download | bcm5719-llvm-b7e02fc0bf18ec1d026291aab48d125a455b3ec5.tar.gz bcm5719-llvm-b7e02fc0bf18ec1d026291aab48d125a455b3ec5.zip |
Remove llvm-upgrade and update tests.
llvm-svn: 47784
Diffstat (limited to 'llvm/test/Feature/intrinsics.ll')
-rw-r--r-- | llvm/test/Feature/intrinsics.ll | 89 |
1 files changed, 46 insertions, 43 deletions
diff --git a/llvm/test/Feature/intrinsics.ll b/llvm/test/Feature/intrinsics.ll index d46472673cf..60c03436a09 100644 --- a/llvm/test/Feature/intrinsics.ll +++ b/llvm/test/Feature/intrinsics.ll @@ -1,59 +1,62 @@ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll +; RUN: llvm-as < %s | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll +declare i1 @llvm.isunordered.f32(float, float) -declare bool %llvm.isunordered.f32(float,float) -declare bool %llvm.isunordered.f64(double,double) +declare i1 @llvm.isunordered.f64(double, double) -declare void %llvm.prefetch(sbyte*, uint, uint) +declare void @llvm.prefetch(i8*, i32, i32) -declare uint %llvm.ctpop.i8(ubyte) -declare uint %llvm.ctpop.i16(ushort) -declare uint %llvm.ctpop.i32(uint) -declare uint %llvm.ctpop.i64(ulong) +declare i32 @llvm.ctpop.i8(i8) -declare uint %llvm.cttz.i8(ubyte) -declare uint %llvm.cttz.i16(ushort) -declare uint %llvm.cttz.i32(uint) -declare uint %llvm.cttz.i64(ulong) +declare i32 @llvm.ctpop.i16(i16) -declare uint %llvm.ctlz.i8(ubyte) -declare uint %llvm.ctlz.i16(ushort) -declare uint %llvm.ctlz.i32(uint) -declare uint %llvm.ctlz.i64(ulong) +declare i32 @llvm.ctpop.i32(i32) -declare float %llvm.sqrt.f32(float) -declare double %llvm.sqrt.f64(double) +declare i32 @llvm.ctpop.i64(i64) -implementation +declare i32 @llvm.cttz.i8(i8) + +declare i32 @llvm.cttz.i16(i16) + +declare i32 @llvm.cttz.i32(i32) + +declare i32 @llvm.cttz.i64(i64) + +declare i32 @llvm.ctlz.i8(i8) + +declare i32 @llvm.ctlz.i16(i16) + +declare i32 @llvm.ctlz.i32(i32) + +declare i32 @llvm.ctlz.i64(i64) + +declare float @llvm.sqrt.f32(float) + +declare double @llvm.sqrt.f64(double) ; Test llvm intrinsics ; -void %libm() { - 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.f32(float 5.0) - call double %llvm.sqrt.f64(double 6.0) - - call uint %llvm.ctpop.i8(ubyte 10) - call uint %llvm.ctpop.i16(ushort 11) - call uint %llvm.ctpop.i32(uint 12) - call uint %llvm.ctpop.i64(ulong 13) - - call uint %llvm.ctlz.i8(ubyte 14) - call uint %llvm.ctlz.i16(ushort 15) - call uint %llvm.ctlz.i32(uint 16) - call uint %llvm.ctlz.i64(ulong 17) - - call uint %llvm.cttz.i8(ubyte 18) - call uint %llvm.cttz.i16(ushort 19) - call uint %llvm.cttz.i32(uint 20) - call uint %llvm.cttz.i64(ulong 21) - ret void +define void @libm() { + fcmp uno float 1.000000e+00, 2.000000e+00 ; <i1>:1 [#uses=0] + fcmp uno double 3.000000e+00, 4.000000e+00 ; <i1>:2 [#uses=0] + call void @llvm.prefetch( i8* null, i32 1, i32 3 ) + call float @llvm.sqrt.f32( float 5.000000e+00 ) ; <float>:3 [#uses=0] + call double @llvm.sqrt.f64( double 6.000000e+00 ) ; <double>:4 [#uses=0] + call i32 @llvm.ctpop.i8( i8 10 ) ; <i32>:5 [#uses=0] + call i32 @llvm.ctpop.i16( i16 11 ) ; <i32>:6 [#uses=0] + call i32 @llvm.ctpop.i32( i32 12 ) ; <i32>:7 [#uses=0] + call i32 @llvm.ctpop.i64( i64 13 ) ; <i32>:8 [#uses=0] + call i32 @llvm.ctlz.i8( i8 14 ) ; <i32>:9 [#uses=0] + call i32 @llvm.ctlz.i16( i16 15 ) ; <i32>:10 [#uses=0] + call i32 @llvm.ctlz.i32( i32 16 ) ; <i32>:11 [#uses=0] + call i32 @llvm.ctlz.i64( i64 17 ) ; <i32>:12 [#uses=0] + call i32 @llvm.cttz.i8( i8 18 ) ; <i32>:13 [#uses=0] + call i32 @llvm.cttz.i16( i16 19 ) ; <i32>:14 [#uses=0] + call i32 @llvm.cttz.i32( i32 20 ) ; <i32>:15 [#uses=0] + call i32 @llvm.cttz.i64( i64 21 ) ; <i32>:16 [#uses=0] + ret void } ; FIXME: test ALL the intrinsics in this file. |