blob: 2e1dc0c01394c62489563f1b796e0735755f8220 [file] [log] [blame]
Sanjiv Guptafdf44dc2009-12-29 03:24:34 +00001; RUN: llc < %s -march=pic16 | grep "extern @.lib.unordered.f32" | count 3
2
3@pc = global i8* inttoptr (i64 160 to i8*), align 1 ; <i8**> [#uses=2]
4@aa = common global i16 0, align 1 ; <i16*> [#uses=0]
5@c6214.auto.d = internal global float 0.000000e+00, align 4 ; <float*> [#uses=1]
6@c6214.auto.l = internal global float 0.000000e+00, align 4 ; <float*> [#uses=1]
7
8define float @dvalue(float %f) nounwind {
9entry:
10 ret float %f
11}
12
13define void @_assert(i16 %line, i16 %result) nounwind {
14entry:
15 %add = add i16 %line, %result ; <i16> [#uses=1]
16 %conv = trunc i16 %add to i8 ; <i8> [#uses=1]
17 %tmp2 = load i8** @pc ; <i8*> [#uses=1]
18 store i8 %conv, i8* %tmp2
19 ret void
20}
21
22define i16 @main() nounwind {
23entry:
24 %retval = alloca i16, align 1 ; <i16*> [#uses=2]
25 store i16 0, i16* %retval
26 call void @c6214()
27 %0 = load i16* %retval ; <i16> [#uses=1]
28 ret i16 %0
29}
30
31define internal void @c6214() nounwind {
32entry:
33 %call = call float @dvalue(float 0x3FF3C0CA40000000) ; <float> [#uses=3]
34 store float %call, float* @c6214.auto.d
35 store float %call, float* @c6214.auto.l
36 %cmp = fcmp ord float %call, 0.000000e+00 ; <i1> [#uses=1]
37 %conv = zext i1 %cmp to i16 ; <i16> [#uses=1]
38 call void @_assert(i16 10, i16 %conv)
39 %tmp3 = load i8** @pc ; <i8*> [#uses=2]
40 %tmp4 = load i8* %tmp3 ; <i8> [#uses=1]
41 %sub = add i8 %tmp4, -10 ; <i8> [#uses=1]
42 store i8 %sub, i8* %tmp3
43 ret void
44}