File: pr1489.ll

package info (click to toggle)
llvm-toolchain-3.7 1%3A3.7.1-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 345,556 kB
  • ctags: 362,199
  • sloc: cpp: 2,156,381; ansic: 458,339; objc: 91,547; python: 89,988; asm: 86,305; sh: 21,479; makefile: 6,853; perl: 5,601; ml: 5,458; pascal: 3,933; lisp: 2,429; xml: 686; cs: 239; php: 202; csh: 117
file content (55 lines) | stat: -rw-r--r-- 1,910 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
; RUN: llc < %s -disable-fp-elim -O0 -mcpu=i486 | grep 1082126238 | count 3
; RUN: llc < %s -disable-fp-elim -O0 -mcpu=i486 | grep -- -1236950581 | count 1
;; magic constants are 3.999f and half of 3.999
; ModuleID = '1489.c'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "i686-apple-darwin8"
@.str = internal constant [13 x i8] c"%d %d %d %d\0A\00"		; <[13 x i8]*> [#uses=1]

define i32 @quux() nounwind {
entry:
	%tmp1 = tail call i32 @lrintf( float 0x400FFDF3C0000000 )		; <i32> [#uses=1]
	%tmp2 = icmp slt i32 %tmp1, 1		; <i1> [#uses=1]
	%tmp23 = zext i1 %tmp2 to i32		; <i32> [#uses=1]
	ret i32 %tmp23
}

declare i32 @lrintf(float)

define i32 @foo() nounwind {
entry:
	%tmp1 = tail call i32 @lrint( double 3.999000e+00 )		; <i32> [#uses=1]
	%tmp2 = icmp slt i32 %tmp1, 1		; <i1> [#uses=1]
	%tmp23 = zext i1 %tmp2 to i32		; <i32> [#uses=1]
	ret i32 %tmp23
}

declare i32 @lrint(double)

define i32 @bar() nounwind {
entry:
	%tmp1 = tail call i32 @lrintf( float 0x400FFDF3C0000000 )		; <i32> [#uses=1]
	%tmp2 = icmp slt i32 %tmp1, 1		; <i1> [#uses=1]
	%tmp23 = zext i1 %tmp2 to i32		; <i32> [#uses=1]
	ret i32 %tmp23
}

define i32 @baz() nounwind {
entry:
	%tmp1 = tail call i32 @lrintf( float 0x400FFDF3C0000000 )		; <i32> [#uses=1]
	%tmp2 = icmp slt i32 %tmp1, 1		; <i1> [#uses=1]
	%tmp23 = zext i1 %tmp2 to i32		; <i32> [#uses=1]
	ret i32 %tmp23
}

define i32 @main() nounwind {
entry:
	%tmp = tail call i32 @baz( )		; <i32> [#uses=1]
	%tmp1 = tail call i32 @bar( )		; <i32> [#uses=1]
	%tmp2 = tail call i32 @foo( )		; <i32> [#uses=1]
	%tmp3 = tail call i32 @quux( )		; <i32> [#uses=1]
	%tmp5 = tail call i32 (i8*, ...) @printf( i8* getelementptr ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), i32 %tmp3, i32 %tmp2, i32 %tmp1, i32 %tmp )		; <i32> [#uses=0]
	ret i32 undef
}

declare i32 @printf(i8*, ...)