1 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim | grep movss | count 1
2 ; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -disable-fp-elim -stats |& grep {Number of re-materialization} | grep 1
4 %struct..0objc_object = type opaque
5 %struct.OhBoy = type { }
6 %struct.BooHoo = type { i32 }
7 %struct.objc_selector = type opaque
8 @llvm.used = appending global [1 x i8*] [ i8* bitcast (void (%struct.OhBoy*, %struct.objc_selector*, i32, %struct.BooHoo*)* @"-[MessageHeaderDisplay adjustFontSizeBy:viewingState:]" to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0]
10 define void @"-[MessageHeaderDisplay adjustFontSizeBy:viewingState:]"(%struct.OhBoy* %self, %struct.objc_selector* %_cmd, i32 %delta, %struct.BooHoo* %viewingState) nounwind {
12 %tmp19 = load i32* null, align 4 ; <i32> [#uses=1]
13 %tmp24 = tail call float bitcast (void (%struct..0objc_object*, ...)* @objc_msgSend_fpret to float (%struct..0objc_object*, %struct.objc_selector*)*)( %struct..0objc_object* null, %struct.objc_selector* null ) nounwind ; <float> [#uses=2]
14 %tmp30 = icmp sgt i32 %delta, 0 ; <i1> [#uses=1]
15 br i1 %tmp30, label %bb33, label %bb87.preheader
16 bb33: ; preds = %entry
17 %tmp28 = fadd float 0.000000e+00, %tmp24 ; <float> [#uses=1]
18 %tmp35 = fcmp ogt float %tmp28, 1.800000e+01 ; <i1> [#uses=1]
19 br i1 %tmp35, label %bb38, label %bb87.preheader
21 %tmp53 = add i32 %tmp19, %delta ; <i32> [#uses=2]
24 store i32 %tmp53, i32* null, align 4
27 %tmp56 = fsub float 1.800000e+01, %tmp24 ; <float> [#uses=1]
28 %tmp57 = fcmp ugt float 0.000000e+00, %tmp56 ; <i1> [#uses=1]
29 br i1 %tmp57, label %bb64, label %bb87.preheader
32 bb87.preheader: ; preds = %bb50, %bb33, %entry
33 %usableDelta.0 = phi i32 [ %delta, %entry ], [ %delta, %bb33 ], [ %tmp53, %bb50 ] ; <i32> [#uses=1]
34 %tmp100 = tail call %struct..0objc_object* (%struct..0objc_object*, %struct.objc_selector*, ...)* @objc_msgSend( %struct..0objc_object* null, %struct.objc_selector* null, %struct..0objc_object* null ) nounwind ; <%struct..0objc_object*> [#uses=2]
35 %tmp106 = tail call %struct..0objc_object* (%struct..0objc_object*, %struct.objc_selector*, ...)* @objc_msgSend( %struct..0objc_object* %tmp100, %struct.objc_selector* null ) nounwind ; <%struct..0objc_object*> [#uses=0]
36 %umax = select i1 false, i32 1, i32 0 ; <i32> [#uses=1]
38 bb108: ; preds = %bb108, %bb87.preheader
39 %attachmentIndex.0.reg2mem.0 = phi i32 [ 0, %bb87.preheader ], [ %indvar.next, %bb108 ] ; <i32> [#uses=2]
40 %tmp114 = tail call %struct..0objc_object* (%struct..0objc_object*, %struct.objc_selector*, ...)* @objc_msgSend( %struct..0objc_object* %tmp100, %struct.objc_selector* null, i32 %attachmentIndex.0.reg2mem.0 ) nounwind ; <%struct..0objc_object*> [#uses=1]
41 %tmp121 = tail call %struct..0objc_object* (%struct..0objc_object*, %struct.objc_selector*, ...)* @objc_msgSend( %struct..0objc_object* %tmp114, %struct.objc_selector* null, i32 %usableDelta.0 ) nounwind ; <%struct..0objc_object*> [#uses=0]
42 %indvar.next = add i32 %attachmentIndex.0.reg2mem.0, 1 ; <i32> [#uses=2]
43 %exitcond = icmp eq i32 %indvar.next, %umax ; <i1> [#uses=1]
44 br i1 %exitcond, label %bb130, label %bb108
45 bb130: ; preds = %bb108
49 declare %struct..0objc_object* @objc_msgSend(%struct..0objc_object*, %struct.objc_selector*, ...)
51 declare void @objc_msgSend_fpret(%struct..0objc_object*, ...)