1; RUN: llc -mtriple=hexagon -O2 < %s | FileCheck %s 2; Check the values of cfi offsets emitted. 3; CHECK: .cfi_def_cfa r30, 8 4; CHECK: .cfi_offset r31, -4 5; CHECK: .cfi_offset r30, -8 6; CHECK: .cfi_offset r17, -12 7; CHECK: .cfi_offset r16, -16 8 9%s.0 = type { ptr, ptr } 10%s.1 = type { ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, %s.2 } 11%s.2 = type { i64, ptr, i32, i32, [12 x i8] } 12%s.3 = type { ptr, i32, ptr, i32 } 13 14; Function Attrs: noreturn 15define void @f0(ptr %a0, ptr %a1, ptr %a2) #0 { 16b0: 17 %v0 = getelementptr inbounds i8, ptr %a0, i32 -80 18 store ptr %a1, ptr %v0, align 16, !tbaa !0 19 %v2 = getelementptr inbounds i8, ptr %a0, i32 -76 20 store ptr %a2, ptr %v2, align 4, !tbaa !9 21 %v4 = tail call ptr @f1(ptr null) #3 22 %v5 = getelementptr inbounds i8, ptr %a0, i32 -72 23 store ptr %v4, ptr %v5, align 8, !tbaa !10 24 %v7 = tail call ptr @f1(ptr %v4) #3 25 %v8 = tail call ptr @f2(ptr null) #3 26 %v9 = getelementptr inbounds i8, ptr %a0, i32 -68 27 store ptr %v8, ptr %v9, align 4, !tbaa !11 28 %v11 = tail call ptr @f2(ptr %v8) #3 29 %v12 = getelementptr inbounds i8, ptr %a0, i32 -64 30 store ptr null, ptr %v12, align 16, !tbaa !12 31 %v14 = getelementptr inbounds i8, ptr %a0, i32 -60 32 store i32 0, ptr %v14, align 4, !tbaa !13 33 %v16 = getelementptr inbounds i8, ptr %a0, i32 -32 34 store i64 4921953907261516544, ptr %v16, align 16, !tbaa !14 35 %v19 = getelementptr inbounds i8, ptr %a0, i32 -24 36 store ptr @f3, ptr %v19, align 8, !tbaa !15 37 %v21 = tail call ptr @f4() #3 38 %v22 = getelementptr inbounds %s.3, ptr %v21, i32 0, i32 1 39 %v23 = load i32, ptr %v22, align 4, !tbaa !16 40 %v24 = add i32 %v23, 1 41 store i32 %v24, ptr %v22, align 4, !tbaa !16 42 %v25 = tail call zeroext i8 @f5(ptr %v16) #4 43 %v26 = tail call ptr @f6(ptr %v16) #3 44 tail call void @f7() #5 45 unreachable 46} 47 48; Function Attrs: nounwind 49declare ptr @f1(ptr) #1 50 51; Function Attrs: nounwind 52declare ptr @f2(ptr) #1 53 54define internal void @f3(i8 zeroext %a0, ptr %a1) #2 { 55b0: 56 %v1 = load i64, ptr %a1, align 16, !tbaa !18 57 %v2 = icmp eq i64 %v1, 4921953907261516544 58 br i1 %v2, label %b1, label %b4 59 60b1: ; preds = %b0 61 %v3 = getelementptr inbounds %s.2, ptr %a1, i32 1 62 %v5 = getelementptr inbounds %s.2, ptr %a1, i32 -2, i32 3 63 %v6 = getelementptr inbounds i32, ptr %v5, i32 1 64 %v8 = load ptr, ptr %v6, align 4, !tbaa !9 65 %v9 = icmp eq ptr %v8, null 66 br i1 %v9, label %b3, label %b2 67 68b2: ; preds = %b1 69 tail call void %v8(ptr %v3) #4 70 br label %b3 71 72b3: ; preds = %b2, %b1 73 tail call void @f8(ptr %v3) #3 74 br label %b4 75 76b4: ; preds = %b3, %b0 77 ret void 78} 79 80; Function Attrs: nounwind 81declare ptr @f4() #1 82 83declare zeroext i8 @f5(ptr) #2 84 85; Function Attrs: nounwind 86declare ptr @f6(ptr) #1 87 88; Function Attrs: noreturn 89declare void @f7() #0 90 91; Function Attrs: nounwind 92declare void @f8(ptr) #1 93 94attributes #0 = { noreturn "target-cpu"="hexagonv60" } 95attributes #1 = { nounwind "target-cpu"="hexagonv60" } 96attributes #2 = { "target-cpu"="hexagonv60" } 97attributes #3 = { nobuiltin nounwind } 98attributes #4 = { nobuiltin } 99attributes #5 = { nobuiltin noreturn } 100 101!0 = !{!1, !2, i64 0} 102!1 = !{!"_ZTS15__cxa_exception", !2, i64 0, !2, i64 4, !2, i64 8, !2, i64 12, !2, i64 16, !5, i64 20, !5, i64 24, !2, i64 28, !2, i64 32, !2, i64 36, !2, i64 40, !6, i64 48} 103!2 = !{!"any pointer", !3, i64 0} 104!3 = !{!"omnipotent char", !4, i64 0} 105!4 = !{!"Simple C/C++ TBAA"} 106!5 = !{!"int", !3, i64 0} 107!6 = !{!"_ZTS17_Unwind_Exception", !7, i64 0, !2, i64 8, !8, i64 12, !8, i64 16} 108!7 = !{!"long long", !3, i64 0} 109!8 = !{!"long", !3, i64 0} 110!9 = !{!1, !2, i64 4} 111!10 = !{!1, !2, i64 8} 112!11 = !{!1, !2, i64 12} 113!12 = !{!1, !2, i64 16} 114!13 = !{!1, !5, i64 20} 115!14 = !{!1, !7, i64 48} 116!15 = !{!1, !2, i64 56} 117!16 = !{!17, !5, i64 4} 118!17 = !{!"_ZTS16__cxa_eh_globals", !2, i64 0, !5, i64 4, !2, i64 8, !5, i64 12} 119!18 = !{!6, !7, i64 0} 120