blob: d9e0778102cb4e1763fb09be50327579a90749bf [file] [log] [blame]
Dan Gohman36a09472009-09-08 23:54:48 +00001; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+sse2 | not grep movaps
Evan Chengb2e72b02008-02-13 03:23:53 +00002; PR1877
3
4@NNTOT = weak global i32 0 ; <i32*> [#uses=1]
5@G = weak global float 0.000000e+00 ; <float*> [#uses=1]
6
7define void @runcont(i32* %source) nounwind {
8entry:
9 %tmp10 = load i32* @NNTOT, align 4 ; <i32> [#uses=1]
10 br label %bb
11
12bb: ; preds = %bb, %entry
13 %neuron.0 = phi i32 [ 0, %entry ], [ %indvar.next, %bb ] ; <i32> [#uses=2]
14 %thesum.0 = phi float [ 0.000000e+00, %entry ], [ %tmp6, %bb ] ; <float> [#uses=1]
15 %tmp2 = getelementptr i32* %source, i32 %neuron.0 ; <i32*> [#uses=1]
16 %tmp3 = load i32* %tmp2, align 4 ; <i32> [#uses=1]
17 %tmp34 = sitofp i32 %tmp3 to float ; <float> [#uses=1]
Dan Gohmanae3a0be2009-06-04 22:49:04 +000018 %tmp6 = fadd float %tmp34, %thesum.0 ; <float> [#uses=2]
Evan Chengb2e72b02008-02-13 03:23:53 +000019 %indvar.next = add i32 %neuron.0, 1 ; <i32> [#uses=2]
20 %exitcond = icmp eq i32 %indvar.next, %tmp10 ; <i1> [#uses=1]
21 br i1 %exitcond, label %bb13, label %bb
22
23bb13: ; preds = %bb
Chris Lattnerd2bf4322011-11-27 06:54:59 +000024 store volatile float %tmp6, float* @G, align 4
Evan Chengb2e72b02008-02-13 03:23:53 +000025 ret void
26}