1 ; RUN: llc -march=hexagon < %s
4 target triple = "hexagon"
6 %s.0 = type { i8, i8, i8, i8 }
10 %s.4 = type { i8, i8, i16, i8 }
11 %s.5 = type { i8, ptr }
13 @g0 = external hidden global [3 x %s.0], align 8
14 @g1 = external hidden global [3 x %s.0], align 8
15 @g2 = external hidden global [3 x %s.0], align 8
16 @g3 = external hidden global [3 x %s.0], align 8
17 @g4 = external hidden global [3 x %s.0], align 8
18 @g5 = external hidden global [3 x %s.0], align 8
19 @g6 = external hidden global [4 x %s.0], align 8
20 @g7 = external hidden global [3 x %s.0], align 8
21 @g8 = external hidden global [3 x %s.0], align 8
22 @g9 = external hidden global [3 x %s.0], align 8
23 @g10 = external hidden global [4 x %s.0], align 8
24 @g11 = external hidden global [3 x %s.0], align 8
25 @g12 = external hidden global [3 x %s.0], align 8
26 @g13 = external hidden global [4 x %s.0], align 8
27 @g14 = external hidden global [3 x %s.0], align 8
28 @g15 = external hidden global [3 x %s.0], align 8
29 @g16 = external hidden global [3 x %s.0], align 8
30 @g17 = external hidden global [4 x %s.0], align 8
31 @g18 = external hidden global [3 x %s.0], align 8
33 ; Function Attrs: norecurse nounwind optsize ssp
34 define hidden zeroext i8 @f0(ptr nocapture readnone %a0, ptr readonly %a1, ptr %a2, i32 %a3) unnamed_addr #0 align 2 {
36 br i1 undef, label %b4, label %b1
39 %v0 = icmp eq i32 %a3, 1
40 %v1 = select i1 %v0, ptr @g18, ptr @g0
41 %v2 = icmp eq i32 %a3, 2
42 %v3 = select i1 %v2, ptr @g16, ptr %v1
43 %v4 = icmp eq i32 %a3, 3
44 %v5 = select i1 %v4, ptr @g15, ptr %v3
45 %v6 = icmp eq i32 %a3, 4
46 %v7 = select i1 %v6, ptr @g14, ptr %v5
47 %v8 = icmp eq i32 %a3, 5
48 %v9 = select i1 %v8, ptr @g12, ptr %v7
49 %v10 = icmp eq i32 %a3, 6
50 %v11 = select i1 %v10, ptr @g11, ptr %v9
51 %v12 = icmp eq i32 %a3, 7
52 %v13 = select i1 %v12, ptr @g9, ptr %v11
53 %v14 = icmp eq i32 %a3, 8
54 %v15 = select i1 %v14, ptr @g8, ptr %v13
55 %v16 = icmp eq i32 %a3, 9
56 %v17 = select i1 %v16, ptr @g7, ptr %v15
57 %v18 = icmp eq i32 %a3, 10
58 %v19 = select i1 %v18, ptr @g5, ptr %v17
59 %v20 = icmp eq i32 %a3, 11
60 %v21 = select i1 %v20, ptr @g4, ptr %v19
61 %v22 = icmp eq i32 %a3, 12
62 %v23 = select i1 %v22, ptr @g3, ptr %v21
63 %v24 = icmp eq i32 %a3, 13
64 %v25 = select i1 %v24, ptr @g2, ptr %v23
65 %v26 = select i1 undef, ptr @g1, ptr %v25
66 %v27 = select i1 undef, ptr @g17, ptr %v26
67 %v28 = icmp eq i32 %a3, 16
68 %v29 = select i1 %v28, ptr @g13, ptr %v27
69 %v30 = icmp eq i32 %a3, 17
70 %v31 = select i1 %v30, ptr null, ptr %v29
71 %v32 = select i1 undef, ptr @g10, ptr %v31
72 %v33 = select i1 undef, ptr @g6, ptr %v32
73 %v34 = add i32 %a3, -15
74 %v35 = icmp ult i32 %v34, 2
75 %v36 = select i1 %v35, i8 4, i8 3
76 %v37 = select i1 undef, i8 0, i8 %v36
77 %v38 = select i1 undef, i8 4, i8 %v37
78 br i1 undef, label %b2, label %b3
80 b2: ; preds = %b3, %b1
81 %v39 = phi ptr [ undef, %b3 ], [ %v33, %b1 ]
82 %v40 = phi i8 [ undef, %b3 ], [ %v38, %b1 ]
83 %v41 = getelementptr inbounds %s.5, ptr %a2, i32 0, i32 1
84 store ptr %v39, ptr %v41, align 4
85 store i8 %v40, ptr undef, align 4
91 b4: ; preds = %b2, %b0
95 attributes #0 = { norecurse nounwind optsize ssp "target-cpu"="hexagonv55" }