1; RUN: llc -march=hexagon -hexagon-emit-jump-tables=0 < %s 2; REQUIRES: asserts 3; Check for successful compilation. 4 5target triple = "hexagon" 6 7%s.0 = type opaque 8%s.1 = type { i32, i32, i32 } 9 10@g0 = external global %s.0 11@g1 = external global %s.0 12@g2 = external global %s.0 13@g3 = external global %s.0 14@g4 = external global %s.0 15 16; Function Attrs: nounwind optsize 17define zeroext i8 @f0(%s.1* %a0, %s.0** nocapture %a1) #0 { 18b0: 19 store %s.0* null, %s.0** %a1, align 4, !tbaa !0 20 %v0 = getelementptr inbounds %s.1, %s.1* %a0, i32 0, i32 1 21 %v1 = load i32, i32* %v0, align 4, !tbaa !4 22 %v2 = icmp eq i32 %v1, 0 23 br i1 %v2, label %b1, label %b8 24 25b1: ; preds = %b0 26 %v3 = getelementptr inbounds %s.1, %s.1* %a0, i32 0, i32 0 27 %v4 = load i32, i32* %v3, align 4, !tbaa !7 28 switch i32 %v4, label %b8 [ 29 i32 0, label %b2 30 i32 1, label %b4 31 i32 4, label %b5 32 i32 5, label %b6 33 i32 2, label %b7 34 ] 35 36b2: ; preds = %b1 37 %v5 = getelementptr inbounds %s.1, %s.1* %a0, i32 0, i32 2 38 %v6 = load i32, i32* %v5, align 4, !tbaa !8 39 switch i32 %v6, label %b8 [ 40 i32 27, label %b3 41 i32 44, label %b3 42 ] 43 44b3: ; preds = %b7, %b7, %b7, %b6, %b6, %b5, %b5, %b4, %b4, %b2, %b2 45 %v7 = phi %s.0* [ @g0, %b2 ], [ @g0, %b2 ], [ @g1, %b4 ], [ @g1, %b4 ], [ @g2, %b5 ], [ @g2, %b5 ], [ @g3, %b6 ], [ @g3, %b6 ], [ @g4, %b7 ], [ @g4, %b7 ], [ @g4, %b7 ] 46 store %s.0* %v7, %s.0** %a1, align 4, !tbaa !0 47 br label %b8 48 49b4: ; preds = %b1 50 %v8 = getelementptr inbounds %s.1, %s.1* %a0, i32 0, i32 2 51 %v9 = load i32, i32* %v8, align 4, !tbaa !8 52 switch i32 %v9, label %b8 [ 53 i32 27, label %b3 54 i32 44, label %b3 55 ] 56 57b5: ; preds = %b1 58 %v10 = getelementptr inbounds %s.1, %s.1* %a0, i32 0, i32 2 59 %v11 = load i32, i32* %v10, align 4, !tbaa !8 60 switch i32 %v11, label %b8 [ 61 i32 27, label %b3 62 i32 44, label %b3 63 ] 64 65b6: ; preds = %b1 66 %v12 = getelementptr inbounds %s.1, %s.1* %a0, i32 0, i32 2 67 %v13 = load i32, i32* %v12, align 4, !tbaa !8 68 switch i32 %v13, label %b8 [ 69 i32 27, label %b3 70 i32 44, label %b3 71 ] 72 73b7: ; preds = %b1 74 %v14 = getelementptr inbounds %s.1, %s.1* %a0, i32 0, i32 2 75 %v15 = load i32, i32* %v14, align 4, !tbaa !8 76 switch i32 %v15, label %b8 [ 77 i32 40, label %b3 78 i32 46, label %b3 79 i32 47, label %b3 80 ] 81 82b8: ; preds = %b7, %b6, %b5, %b4, %b3, %b2, %b1, %b0 83 %v16 = phi i8 [ 1, %b3 ], [ 0, %b0 ], [ 0, %b2 ], [ 0, %b4 ], [ 0, %b5 ], [ 0, %b6 ], [ 0, %b1 ], [ 0, %b7 ] 84 ret i8 %v16 85} 86 87attributes #0 = { nounwind optsize } 88 89!0 = !{!1, !1, i64 0} 90!1 = !{!"any pointer", !2, i64 0} 91!2 = !{!"omnipotent char", !3, i64 0} 92!3 = !{!"Simple C/C++ TBAA"} 93!4 = !{!5, !6, i64 4} 94!5 = !{!"_ZTS3bar", !6, i64 0, !6, i64 4, !6, i64 8} 95!6 = !{!"int", !2, i64 0} 96!7 = !{!5, !6, i64 0} 97!8 = !{!5, !6, i64 8} 98