blob: a3e89e963c00df4697d888510187c031b4a67c26 [file] [log] [blame]
Evan Cheng50a59142009-10-13 22:02:20 +00001; RUN: opt < %s -basicaa -licm -S | FileCheck %s
2; rdar://7282591
3
4%struct.CFRuntimeBase = type { i32, [4 x i8] }
5%struct.XXXAffineTransform = type { float, float, float, float, float, float }
6%struct.XXXContext = type { %struct.CFRuntimeBase, i32, i32, i32, i8*, %struct.XXXContextDelegate*, void (%struct.XXXContext*)*, void (%struct.XXXContext*)*, %struct.XXXImage* (%struct.XXXContext*, %struct.XXXRect*, %struct.XXXImage*, i8*)*, i8*, %struct.__CFDictionary*, i32, %struct.XXXGState*, %struct.XXXGStack*, %struct.XXXRenderingState*, %struct.XXXAffineTransform, %struct.XXXPath*, %struct.__CFDictionary*, %struct.XXXPixelAccess* }
7%struct.XXXContextDelegate = type opaque
8%struct.XXXGStack = type opaque
9%struct.XXXGState = type opaque
10%struct.XXXImage = type opaque
11%struct.XXXPath = type opaque
12%struct.XXXPixelAccess = type opaque
13%struct.XXXPoint = type { float, float }
14%struct.XXXRect = type { %struct.XXXPoint, %struct.XXXPoint }
15%struct.XXXRenderingState = type opaque
16%struct.__CFDictionary = type opaque
17
18define void @t(%struct.XXXContext* %context, i16* %glyphs, %struct.XXXPoint* %advances, i32 %count) nounwind optsize ssp {
19; CHECK: @t
20; CHECK: bb21.preheader:
21; CHECK: %tmp28 = getelementptr
22; CHECK: %tmp28.promoted = load
23entry:
24 br i1 undef, label %bb1, label %bb
25
26bb: ; preds = %entry
27 br i1 undef, label %bb2, label %bb1
28
29bb1: ; preds = %bb, %entry
30 ret void
31
32bb2: ; preds = %bb
33 br i1 undef, label %bb35, label %bb7
34
35bb7: ; preds = %bb2
36 br i1 undef, label %bb35, label %bb10
37
38bb10: ; preds = %bb7
39 %tmp18 = alloca i8, i32 undef, align 1 ; <i8*> [#uses=1]
40 br i1 undef, label %bb35, label %bb15
41
42bb15: ; preds = %bb10
43 br i1 undef, label %bb17, label %bb16
44
45bb16: ; preds = %bb15
46 %tmp21 = bitcast i8* %tmp18 to %struct.XXXPoint* ; <%struct.XXXPoint*> [#uses=1]
47 br label %bb18
48
49bb17: ; preds = %bb15
50 %tmp22 = malloc %struct.XXXPoint, i32 %count ; <%struct.XXXPoint*> [#uses=1]
51 br label %bb18
52
53bb18: ; preds = %bb17, %bb16
54 %positions.0 = phi %struct.XXXPoint* [ %tmp21, %bb16 ], [ %tmp22, %bb17 ] ; <%struct.XXXPoint*> [#uses=1]
55 br i1 undef, label %bb35, label %bb20
56
57bb20: ; preds = %bb18
58 br i1 undef, label %bb21, label %bb25
59
60bb21: ; preds = %bb21, %bb20
61 %tmp28 = getelementptr inbounds %struct.XXXPoint* %positions.0, i32 undef, i32 0 ; <float*> [#uses=1]
62 store float undef, float* %tmp28, align 4
63 %elt22 = getelementptr inbounds %struct.XXXPoint* %advances, i32 undef, i32 1 ; <float*> [#uses=1]
64 %val23 = load float* %elt22 ; <float> [#uses=0]
65 br i1 undef, label %bb21, label %bb25
66
67bb25: ; preds = %bb21, %bb20
68 switch i32 undef, label %bb26 [
69 i32 4, label %bb27
70 i32 5, label %bb27
71 i32 6, label %bb27
72 i32 7, label %bb28
73 ]
74
75bb26: ; preds = %bb25
76 unreachable
77
78bb27: ; preds = %bb25, %bb25, %bb25
79 unreachable
80
81bb28: ; preds = %bb25
82 unreachable
83
84bb35: ; preds = %bb18, %bb10, %bb7, %bb2
85 ret void
86}