source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AArch64/arm64-big-endian-eh.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 2.0 KB
Line 
1; RUN: llc -mtriple aarch64_be-linux-gnu -filetype obj < %s | llvm-objdump -s - | FileCheck %s
2
3; ARM EHABI for big endian
4; This test case checks whether CIE length record is laid out in big endian format.
5;
6; This is the LLVM assembly generated from following C++ code:
7;
8; extern void foo(int);
9; void test(int a, int b) {
10;   try {
11;   foo(a);
12; } catch (...) {
13;   foo(b);
14; }
15;}
16
17define void @_Z4testii(i32 %a, i32 %b) #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
18entry:
19  invoke void @_Z3fooi(i32 %a)
20          to label %try.cont unwind label %lpad
21
22lpad:                                             ; preds = %entry
23  %0 = landingpad { i8*, i32 }
24          catch i8* null
25  %1 = extractvalue { i8*, i32 } %0, 0
26  %2 = tail call i8* @__cxa_begin_catch(i8* %1) #2
27  invoke void @_Z3fooi(i32 %b)
28          to label %invoke.cont2 unwind label %lpad1
29
30invoke.cont2:                                     ; preds = %lpad
31  tail call void @__cxa_end_catch()
32  br label %try.cont
33
34try.cont:                                         ; preds = %entry, %invoke.cont2
35  ret void
36
37lpad1:                                            ; preds = %lpad
38  %3 = landingpad { i8*, i32 }
39          cleanup
40  invoke void @__cxa_end_catch()
41          to label %eh.resume unwind label %terminate.lpad
42
43eh.resume:                                        ; preds = %lpad1
44  resume { i8*, i32 } %3
45
46terminate.lpad:                                   ; preds = %lpad1
47  %4 = landingpad { i8*, i32 }
48          catch i8* null
49  %5 = extractvalue { i8*, i32 } %4, 0
50  tail call void @__clang_call_terminate(i8* %5) #3
51  unreachable
52}
53
54declare void @_Z3fooi(i32) #0
55
56declare i32 @__gxx_personality_v0(...)
57
58declare i8* @__cxa_begin_catch(i8*)
59
60declare void @__cxa_end_catch()
61
62; Function Attrs: noinline noreturn nounwind
63define linkonce_odr hidden void @__clang_call_terminate(i8*) #1 {
64  %2 = tail call i8* @__cxa_begin_catch(i8* %0) #2
65  tail call void @_ZSt9terminatev() #3
66  unreachable
67}
68
69declare void @_ZSt9terminatev()
70
71; CHECK-LABEL: Contents of section .eh_frame:
72; CHECK-NEXT: 0000 0000001c
73
Note: See TracBrowser for help on using the repository browser.