annotate llvm/test/Feature/exception.ll @ 252:1f2b6ac9f198 llvm-original

LLVM16-1
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 18 Aug 2023 09:04:13 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
anatofuz
parents:
diff changeset
2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
anatofuz
parents:
diff changeset
3 ; RUN: diff %t1.ll %t2.ll
anatofuz
parents:
diff changeset
4
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
5 @_ZTIc = external constant ptr
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
6 @_ZTId = external constant ptr
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
7 @_ZTIPKc = external constant ptr
150
anatofuz
parents:
diff changeset
8
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
9 define void @_Z3barv() uwtable optsize ssp personality ptr @__gxx_personality_v0 {
150
anatofuz
parents:
diff changeset
10 entry:
anatofuz
parents:
diff changeset
11 invoke void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
12 to label %try.cont unwind label %lpad
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 try.cont: ; preds = %entry, %invoke.cont4
anatofuz
parents:
diff changeset
15 ret void
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 lpad: ; preds = %entry
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
18 %exn = landingpad {ptr, i32}
150
anatofuz
parents:
diff changeset
19 cleanup
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
20 catch ptr @_ZTIc
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
21 filter [2 x ptr] [ptr @_ZTIPKc, ptr @_ZTId]
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
22 resume { ptr, i32 } %exn
150
anatofuz
parents:
diff changeset
23 }
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 declare void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 declare i32 @__gxx_personality_v0(...)
anatofuz
parents:
diff changeset
28
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
29 define void @cleanupret0() personality ptr @__gxx_personality_v0 {
150
anatofuz
parents:
diff changeset
30 entry:
anatofuz
parents:
diff changeset
31 invoke void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
32 to label %exit unwind label %pad
anatofuz
parents:
diff changeset
33 pad:
anatofuz
parents:
diff changeset
34 %cp = cleanuppad within none [i7 4]
anatofuz
parents:
diff changeset
35 cleanupret from %cp unwind to caller
anatofuz
parents:
diff changeset
36 exit:
anatofuz
parents:
diff changeset
37 ret void
anatofuz
parents:
diff changeset
38 }
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 ; forward ref by name
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
41 define void @cleanupret1() personality ptr @__gxx_personality_v0 {
150
anatofuz
parents:
diff changeset
42 entry:
anatofuz
parents:
diff changeset
43 invoke void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
44 to label %exit unwind label %pad
anatofuz
parents:
diff changeset
45 cleanup:
anatofuz
parents:
diff changeset
46 cleanupret from %cp unwind to caller
anatofuz
parents:
diff changeset
47 pad:
anatofuz
parents:
diff changeset
48 %cp = cleanuppad within none []
anatofuz
parents:
diff changeset
49 br label %cleanup
anatofuz
parents:
diff changeset
50 exit:
anatofuz
parents:
diff changeset
51 ret void
anatofuz
parents:
diff changeset
52 }
anatofuz
parents:
diff changeset
53
anatofuz
parents:
diff changeset
54 ; forward ref by ID
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
55 define void @cleanupret2() personality ptr @__gxx_personality_v0 {
150
anatofuz
parents:
diff changeset
56 entry:
anatofuz
parents:
diff changeset
57 invoke void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
58 to label %exit unwind label %pad
anatofuz
parents:
diff changeset
59 cleanup:
anatofuz
parents:
diff changeset
60 cleanupret from %0 unwind to caller
anatofuz
parents:
diff changeset
61 pad:
anatofuz
parents:
diff changeset
62 %0 = cleanuppad within none []
anatofuz
parents:
diff changeset
63 br label %cleanup
anatofuz
parents:
diff changeset
64 exit:
anatofuz
parents:
diff changeset
65 ret void
anatofuz
parents:
diff changeset
66 }
anatofuz
parents:
diff changeset
67
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
68 define void @catchret0() personality ptr @__gxx_personality_v0 {
150
anatofuz
parents:
diff changeset
69 entry:
anatofuz
parents:
diff changeset
70 invoke void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
71 to label %exit unwind label %pad
anatofuz
parents:
diff changeset
72 pad:
anatofuz
parents:
diff changeset
73 %cs1 = catchswitch within none [label %catch] unwind to caller
anatofuz
parents:
diff changeset
74 catch:
anatofuz
parents:
diff changeset
75 %cp = catchpad within %cs1 [i7 4]
anatofuz
parents:
diff changeset
76 catchret from %cp to label %exit
anatofuz
parents:
diff changeset
77 exit:
anatofuz
parents:
diff changeset
78 ret void
anatofuz
parents:
diff changeset
79 }
anatofuz
parents:
diff changeset
80
anatofuz
parents:
diff changeset
81 ; forward ref by name
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
82 define void @catchret1() personality ptr @__gxx_personality_v0 {
150
anatofuz
parents:
diff changeset
83 entry:
anatofuz
parents:
diff changeset
84 invoke void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
85 to label %exit unwind label %pad
anatofuz
parents:
diff changeset
86 catchret:
anatofuz
parents:
diff changeset
87 catchret from %cp to label %exit
anatofuz
parents:
diff changeset
88 pad:
anatofuz
parents:
diff changeset
89 %cs1 = catchswitch within none [label %catch] unwind to caller
anatofuz
parents:
diff changeset
90 catch:
anatofuz
parents:
diff changeset
91 %cp = catchpad within %cs1 [i7 4]
anatofuz
parents:
diff changeset
92 br label %catchret
anatofuz
parents:
diff changeset
93 exit:
anatofuz
parents:
diff changeset
94 ret void
anatofuz
parents:
diff changeset
95 }
anatofuz
parents:
diff changeset
96
anatofuz
parents:
diff changeset
97 ; forward ref by ID
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
98 define void @catchret2() personality ptr @__gxx_personality_v0 {
150
anatofuz
parents:
diff changeset
99 entry:
anatofuz
parents:
diff changeset
100 invoke void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
101 to label %exit unwind label %pad
anatofuz
parents:
diff changeset
102 catchret:
anatofuz
parents:
diff changeset
103 catchret from %0 to label %exit
anatofuz
parents:
diff changeset
104 pad:
anatofuz
parents:
diff changeset
105 %cs1 = catchswitch within none [label %catch] unwind to caller
anatofuz
parents:
diff changeset
106 catch:
anatofuz
parents:
diff changeset
107 %0 = catchpad within %cs1 [i7 4]
anatofuz
parents:
diff changeset
108 br label %catchret
anatofuz
parents:
diff changeset
109 exit:
anatofuz
parents:
diff changeset
110 ret void
anatofuz
parents:
diff changeset
111 }
anatofuz
parents:
diff changeset
112
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
113 define i8 @catchpad() personality ptr @__gxx_personality_v0 {
150
anatofuz
parents:
diff changeset
114 entry:
anatofuz
parents:
diff changeset
115 invoke void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
116 to label %exit unwind label %bb2
anatofuz
parents:
diff changeset
117 bb2:
anatofuz
parents:
diff changeset
118 %cs1 = catchswitch within none [label %catch] unwind to caller
anatofuz
parents:
diff changeset
119 catch:
anatofuz
parents:
diff changeset
120 catchpad within %cs1 [i7 4]
anatofuz
parents:
diff changeset
121 br label %exit
anatofuz
parents:
diff changeset
122 exit:
anatofuz
parents:
diff changeset
123 ret i8 0
anatofuz
parents:
diff changeset
124 }
anatofuz
parents:
diff changeset
125
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
126 define void @cleanuppad() personality ptr @__gxx_personality_v0 {
150
anatofuz
parents:
diff changeset
127 entry:
anatofuz
parents:
diff changeset
128 br label %try.cont
anatofuz
parents:
diff changeset
129
anatofuz
parents:
diff changeset
130 try.cont:
anatofuz
parents:
diff changeset
131 invoke void @_Z3quxv() optsize
anatofuz
parents:
diff changeset
132 to label %try.cont unwind label %bb
anatofuz
parents:
diff changeset
133 bb:
anatofuz
parents:
diff changeset
134 cleanuppad within none [i7 4]
anatofuz
parents:
diff changeset
135 ret void
anatofuz
parents:
diff changeset
136 }