1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 target triple = "hexagon"
5 @g0 = external global i32
6 @g1 = external global i32, align 4
7 @g2 = external hidden unnamed_addr constant [49 x i8], align 8
8 @g3 = external hidden unnamed_addr constant [76 x i8], align 8
9 @g4 = external unnamed_addr constant { ptr, ptr }
10 @g5 = external hidden unnamed_addr constant [36 x i8], align 8
20 ; Function Attrs: nounwind
21 declare ptr @f4(ptr) #0
23 ; Function Attrs: nounwind
24 declare ptr @f5(ptr) #0
28 ; CHECK-DAG: r0 = ##f3
30 ; CHECK-DAG: r0 = ##f0
32 ; CHECK-DAG: r0 = ##g2
35 ; CHECK-DAG: r0 = ##g3
38 ; CHECK-DAG: r{{[0-9]+}} = ##g1
39 define i32 @f6() personality ptr @f11 {
42 %v0 = tail call ptr @f4(ptr @f3) #0
43 %v1 = tail call ptr @f5(ptr @f0) #0
44 tail call void (ptr, ...) @f8(ptr @g2)
46 tail call void (ptr, ...) @f8(ptr @g3)
47 %v2 = tail call ptr @f10(i32 4) #0
48 %v3 = load i32, ptr @g1, align 4, !tbaa !0
49 %v4 = add nsw i32 %v3, 1
50 store i32 %v4, ptr @g1, align 4, !tbaa !0
51 invoke void @f12(ptr %v2, ptr @g4, ptr null) #1
52 to label %b7 unwind label %b1
55 %v5 = landingpad { ptr, i32 }
57 %v6 = extractvalue { ptr, i32 } %v5, 0
58 %v7 = tail call ptr @f13(ptr %v6) #0
59 store i32 0, ptr @g1, align 4, !tbaa !0
61 to label %b7 unwind label %b2
64 %v8 = landingpad { ptr, i32 }
67 to label %b3 unwind label %b6
70 %v9 = extractvalue { ptr, i32 } %v8, 0
71 %v10 = tail call ptr @f13(ptr %v9) #0
73 %v11 = load i32, ptr @g1, align 4, !tbaa !0
74 %v12 = icmp eq i32 %v11, 0
75 br i1 %v12, label %b5, label %b4
78 tail call void (ptr, ...) @f8(ptr @g5)
79 store i32 1, ptr @g0, align 4, !tbaa !0
82 b5: ; preds = %b4, %b3
83 %v13 = tail call i32 @f1()
84 %v14 = tail call i32 @f2(i32 1)
88 %v15 = landingpad { ptr, i32 }
90 tail call void @f16() #2
93 b7: ; preds = %b1, %b0
99 declare void @f8(ptr, ...)
103 declare ptr @f10(i32)
105 declare i32 @f11(...)
107 declare void @f12(ptr, ptr, ptr)
109 declare ptr @f13(ptr)
117 attributes #0 = { nounwind }
118 attributes #1 = { noreturn }
119 attributes #2 = { noreturn nounwind }
121 !0 = !{!1, !1, i64 0}
123 !2 = !{!"omnipotent char", !3}
124 !3 = !{!"Simple C/C++ TBAA"}