1 ; RUN: llc -march=hexagon -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
2 ; CHECK: .cfi_def_cfa r30
3 ; CHECK: .cfi_offset r31
4 ; CHECK: .cfi_offset r30
6 @g0 = global i32 0, align 4
7 @g1 = external constant ptr
9 define i32 @f0() personality ptr @f3 {
11 %v0 = alloca i32, align 4
14 %v3 = alloca i32, align 4
16 %v4 = call ptr @f1(i32 4) #1
18 invoke void @f2(ptr %v4, ptr @g1, ptr null) #2
19 to label %b6 unwind label %b1
22 %v6 = landingpad { ptr, i32 }
24 %v7 = extractvalue { ptr, i32 } %v6, 0
25 store ptr %v7, ptr %v1
26 %v8 = extractvalue { ptr, i32 } %v6, 1
27 store i32 %v8, ptr %v2
31 %v9 = load i32, ptr %v2
32 %v10 = call i32 @llvm.eh.typeid.for(ptr @g1) #1
33 %v11 = icmp eq i32 %v9, %v10
34 br i1 %v11, label %b3, label %b5
37 %v12 = load ptr, ptr %v1
38 %v13 = call ptr @f4(ptr %v12) #1
39 %v15 = load i32, ptr %v13, align 4
40 store i32 %v15, ptr %v3, align 4
41 %v16 = load i32, ptr %v3, align 4
42 store i32 %v16, ptr @g0, align 4
47 %v17 = load i32, ptr @g0, align 4
51 %v18 = load ptr, ptr %v1
52 %v19 = load i32, ptr %v2
53 %v20 = insertvalue { ptr, i32 } undef, ptr %v18, 0
54 %v21 = insertvalue { ptr, i32 } %v20, i32 %v19, 1
55 resume { ptr, i32 } %v21
63 declare void @f2(ptr, ptr, ptr)
67 ; Function Attrs: nounwind readnone
68 declare i32 @llvm.eh.typeid.for(ptr) #0
74 attributes #0 = { nounwind readnone }
75 attributes #1 = { nounwind }
76 attributes #2 = { noreturn }