- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathrelease_motion_landingpad.ll
29 lines (25 loc) · 989 Bytes
/
release_motion_landingpad.ll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
; RUN: %swift-llvm-opt -passes=swift-llvm-arc-optimize %s | %FileCheck %s
targetdatalayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
targettriple = "x86_64-apple-macosx10.9"
declarevoid@swift_release(ptrnocapture)
declarevoid@swift_retain(ptr) nounwind
declareptr@_Znwm(i64)
declarei32@__gxx_personality_v0(...)
defineptr@foo(ptr%0) personalityptr@__gxx_personality_v0 {
entry:
%1 = tailcallptr@swift_retain(ptr%0)
%2 = invokeptr@_Znwm(i6416)
tolabel%continueunwindlabel%unwind
continue:
tailcallvoid@swift_release(ptr%1)
retptr%1
unwind:
%3 = landingpad { ptr, i32 }
cleanup
tailcallvoid@swift_release(ptr%1)
resume { ptr, i32 } %3
}
; CHECK: unwind:
; CHECK-NEXT: %3 = landingpad { ptr, i32 }
; CHECK-NEXT: cleanup
; CHECK-NEXT: tail call void @swift_release(ptr %1)