blob: b79cce2ead00e535449d5151125d812d0c096bb9 [file] [log] [blame]
Tanya Lattner348c6182008-03-25 04:26:08 +00001; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5
2; END.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Tanya Lattner348c6182008-03-25 04:26:08 +00004define void @test(i8* %stack) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005entry:
Tanya Lattner348c6182008-03-25 04:26:08 +00006 %tmp9 = icmp eq i32 0, 0 ; <i1> [#uses=1]
7 %tmp30 = icmp eq i32 0, 0 ; <i1> [#uses=1]
8 br i1 %tmp30, label %cond_next54, label %cond_true31
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009cond_true860: ; preds = %bb855
Tanya Lattner348c6182008-03-25 04:26:08 +000010 %tmp879 = tail call <4 x float> @llvm.ppc.altivec.vmaddfp( <4 x float> zeroinitializer, <4 x float> zeroinitializer, <4 x float> zeroinitializer ) ; <<4 x float>> [#uses=1]
11 %tmp880 = bitcast <4 x float> %tmp879 to <4 x i32> ; <<4 x i32>> [#uses=2]
12 %tmp883 = shufflevector <4 x i32> %tmp880, <4 x i32> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 > ; <<4 x i32>> [#uses=1]
13 %tmp883.upgrd.1 = bitcast <4 x i32> %tmp883 to <4 x float> ; <<4 x float>> [#uses=1]
14 %tmp885 = shufflevector <4 x i32> %tmp880, <4 x i32> undef, <4 x i32> < i32 2, i32 2, i32 2, i32 2 > ; <<4 x i32>> [#uses=1]
15 %tmp885.upgrd.2 = bitcast <4 x i32> %tmp885 to <4 x float> ; <<4 x float>> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016 br label %cond_next905
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017cond_true31: ; preds = %entry
18 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000019cond_next54: ; preds = %entry
Tanya Lattner348c6182008-03-25 04:26:08 +000020 br i1 %tmp9, label %cond_false385, label %bb279
Dan Gohmanf17a25c2007-07-18 16:29:46 +000021bb279: ; preds = %cond_next54
22 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000023cond_false385: ; preds = %cond_next54
Tanya Lattner348c6182008-03-25 04:26:08 +000024 %tmp388 = icmp eq i32 0, 0 ; <i1> [#uses=1]
25 br i1 %tmp388, label %cond_next463, label %cond_true389
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026cond_true389: ; preds = %cond_false385
27 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000028cond_next463: ; preds = %cond_false385
Tanya Lattner348c6182008-03-25 04:26:08 +000029 %tmp1208107 = icmp ugt i8* null, %stack ; <i1> [#uses=1]
30 br i1 %tmp1208107, label %cond_true1209.preheader, label %bb1212
Dan Gohmanf17a25c2007-07-18 16:29:46 +000031cond_true498: ; preds = %cond_true1209.preheader
32 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000033cond_true519: ; preds = %cond_true1209.preheader
Tanya Lattner348c6182008-03-25 04:26:08 +000034 %bothcond = or i1 false, false ; <i1> [#uses=1]
35 br i1 %bothcond, label %bb855, label %bb980
Dan Gohmanf17a25c2007-07-18 16:29:46 +000036cond_false548: ; preds = %cond_true1209.preheader
37 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000038bb855: ; preds = %cond_true519
Tanya Lattner348c6182008-03-25 04:26:08 +000039 %tmp859 = icmp eq i32 0, 0 ; <i1> [#uses=1]
40 br i1 %tmp859, label %cond_true860, label %cond_next905
Dan Gohmanf17a25c2007-07-18 16:29:46 +000041cond_next905: ; preds = %bb855, %cond_true860
Tanya Lattner348c6182008-03-25 04:26:08 +000042 %vfpw2.4 = phi <4 x float> [ %tmp885.upgrd.2, %cond_true860 ], [ undef, %bb855 ] ; <<4 x float>> [#uses=0]
43 %vfpw1.4 = phi <4 x float> [ %tmp883.upgrd.1, %cond_true860 ], [ undef, %bb855 ] ; <<4 x float>> [#uses=0]
44 %tmp930 = bitcast <4 x float> zeroinitializer to <4 x i32> ; <<4 x i32>> [#uses=0]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000045 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000046bb980: ; preds = %cond_true519
47 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000048cond_true1209.preheader: ; preds = %cond_next463
Tanya Lattner348c6182008-03-25 04:26:08 +000049 %tmp496 = and i32 0, 12288 ; <i32> [#uses=1]
50 switch i32 %tmp496, label %cond_false548 [
51 i32 0, label %cond_true498
52 i32 4096, label %cond_true519
Dan Gohmanf17a25c2007-07-18 16:29:46 +000053 ]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000054bb1212: ; preds = %cond_next463
55 ret void
56}
57
Tanya Lattner348c6182008-03-25 04:26:08 +000058declare <4 x float> @llvm.ppc.altivec.vmaddfp(<4 x float>, <4 x float>, <4 x float>)