• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llvm-as < %s | llvm-dis > %t1.ll
2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4
5declare i1 @llvm.isunordered.f32(float, float)
6
7declare i1 @llvm.isunordered.f64(double, double)
8
9
10declare i8 @llvm.ctpop.i8(i8)
11
12declare i16 @llvm.ctpop.i16(i16)
13
14declare i32 @llvm.ctpop.i32(i32)
15
16declare i64 @llvm.ctpop.i64(i64)
17
18declare i8 @llvm.cttz.i8(i8, i1)
19
20declare i16 @llvm.cttz.i16(i16, i1)
21
22declare i32 @llvm.cttz.i32(i32, i1)
23
24declare i64 @llvm.cttz.i64(i64, i1)
25
26declare i8 @llvm.ctlz.i8(i8, i1)
27
28declare i16 @llvm.ctlz.i16(i16, i1)
29
30declare i32 @llvm.ctlz.i32(i32, i1)
31
32declare i64 @llvm.ctlz.i64(i64, i1)
33
34declare float @llvm.sqrt.f32(float)
35
36declare double @llvm.sqrt.f64(double)
37
38; Test llvm intrinsics
39;
40define void @libm() {
41        fcmp uno float 1.000000e+00, 2.000000e+00               ; <i1>:1 [#uses=0]
42        fcmp uno double 3.000000e+00, 4.000000e+00              ; <i1>:2 [#uses=0]
43        call float @llvm.sqrt.f32( float 5.000000e+00 )         ; <float>:3 [#uses=0]
44        call double @llvm.sqrt.f64( double 6.000000e+00 )               ; <double>:4 [#uses=0]
45        call i8  @llvm.ctpop.i8( i8 10 )                ; <i32>:5 [#uses=0]
46        call i16 @llvm.ctpop.i16( i16 11 )              ; <i32>:6 [#uses=0]
47        call i32 @llvm.ctpop.i32( i32 12 )              ; <i32>:7 [#uses=0]
48        call i64 @llvm.ctpop.i64( i64 13 )              ; <i32>:8 [#uses=0]
49        call i8  @llvm.ctlz.i8( i8 14, i1 true )         ; <i32>:9 [#uses=0]
50        call i16 @llvm.ctlz.i16( i16 15, i1 true )               ; <i32>:10 [#uses=0]
51        call i32 @llvm.ctlz.i32( i32 16, i1 true )               ; <i32>:11 [#uses=0]
52        call i64 @llvm.ctlz.i64( i64 17, i1 true )               ; <i32>:12 [#uses=0]
53        call i8  @llvm.cttz.i8( i8 18, i1 true )         ; <i32>:13 [#uses=0]
54        call i16 @llvm.cttz.i16( i16 19, i1 true )               ; <i32>:14 [#uses=0]
55        call i32 @llvm.cttz.i32( i32 20, i1 true )               ; <i32>:15 [#uses=0]
56        call i64 @llvm.cttz.i64( i64 21, i1 true )               ; <i32>:16 [#uses=0]
57        ret void
58}
59
60; FIXME: test ALL the intrinsics in this file.
61