2011-05-27 18:34:38 +00:00
|
|
|
; RUN: opt < %s -inline -S | FileCheck %s
|
|
|
|
|
|
|
|
; Test that the inliner correctly handles inlining into invoke sites
|
|
|
|
; by appending selectors and forwarding _Unwind_Resume directly to the
|
|
|
|
; enclosing landing pad.
|
|
|
|
|
2011-06-01 02:17:11 +00:00
|
|
|
;; Test 0 - basic functionality.
|
2011-05-30 01:08:04 +00:00
|
|
|
|
2011-05-27 18:34:38 +00:00
|
|
|
%struct.A = type { i8 }
|
|
|
|
|
|
|
|
@_ZTIi = external constant i8*
|
|
|
|
|
|
|
|
declare void @_ZN1AC1Ev(%struct.A*)
|
|
|
|
|
|
|
|
declare void @_ZN1AD1Ev(%struct.A*)
|
|
|
|
|
2011-05-30 01:08:04 +00:00
|
|
|
declare void @use(i32) nounwind
|
|
|
|
|
2011-06-09 20:06:24 +00:00
|
|
|
declare void @opaque()
|
|
|
|
|
2011-05-27 18:34:38 +00:00
|
|
|
declare i32 @llvm.eh.typeid.for(i8*) nounwind
|
|
|
|
|
|
|
|
declare i32 @__gxx_personality_v0(...)
|
|
|
|
|
|
|
|
declare i8* @__cxa_begin_catch(i8*)
|
|
|
|
|
|
|
|
declare void @__cxa_end_catch()
|
|
|
|
|
|
|
|
declare void @_ZSt9terminatev()
|
|
|
|
|
|
|
|
define internal void @test0_in() alwaysinline uwtable ssp {
|
|
|
|
entry:
|
|
|
|
%a = alloca %struct.A, align 1
|
|
|
|
%b = alloca %struct.A, align 1
|
|
|
|
call void @_ZN1AC1Ev(%struct.A* %a)
|
|
|
|
invoke void @_ZN1AC1Ev(%struct.A* %b)
|
|
|
|
to label %invoke.cont unwind label %lpad
|
|
|
|
|
|
|
|
invoke.cont:
|
|
|
|
invoke void @_ZN1AD1Ev(%struct.A* %b)
|
|
|
|
to label %invoke.cont1 unwind label %lpad
|
|
|
|
|
|
|
|
invoke.cont1:
|
|
|
|
call void @_ZN1AD1Ev(%struct.A* %a)
|
|
|
|
ret void
|
|
|
|
|
|
|
|
lpad:
|
2011-09-02 01:25:11 +00:00
|
|
|
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
|
|
|
cleanup
|
2011-05-27 18:34:38 +00:00
|
|
|
invoke void @_ZN1AD1Ev(%struct.A* %a)
|
|
|
|
to label %invoke.cont2 unwind label %terminate.lpad
|
|
|
|
|
|
|
|
invoke.cont2:
|
2011-09-02 01:25:11 +00:00
|
|
|
resume { i8*, i32 } %exn
|
2011-05-27 18:34:38 +00:00
|
|
|
|
|
|
|
terminate.lpad:
|
2011-09-02 01:25:11 +00:00
|
|
|
%exn1 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
|
|
|
catch i8* null
|
2011-05-27 18:34:38 +00:00
|
|
|
call void @_ZSt9terminatev() noreturn nounwind
|
|
|
|
unreachable
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @test0_out() uwtable ssp {
|
|
|
|
entry:
|
|
|
|
invoke void @test0_in()
|
|
|
|
to label %ret unwind label %lpad
|
|
|
|
|
|
|
|
ret:
|
|
|
|
ret void
|
|
|
|
|
|
|
|
lpad: ; preds = %entry
|
2011-09-02 01:25:11 +00:00
|
|
|
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
|
|
|
catch i8* bitcast (i8** @_ZTIi to i8*)
|
|
|
|
%eh.exc = extractvalue { i8*, i32 } %exn, 0
|
|
|
|
%eh.selector = extractvalue { i8*, i32 } %exn, 1
|
2011-05-27 18:34:38 +00:00
|
|
|
%0 = call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) nounwind
|
|
|
|
%1 = icmp eq i32 %eh.selector, %0
|
|
|
|
br i1 %1, label %catch, label %eh.resume
|
|
|
|
|
|
|
|
catch:
|
2011-09-02 01:25:11 +00:00
|
|
|
%ignored = call i8* @__cxa_begin_catch(i8* %eh.exc) nounwind
|
2011-05-27 18:34:38 +00:00
|
|
|
call void @__cxa_end_catch() nounwind
|
|
|
|
br label %ret
|
|
|
|
|
|
|
|
eh.resume:
|
2011-09-02 01:25:11 +00:00
|
|
|
resume { i8*, i32 } %exn
|
2011-05-27 18:34:38 +00:00
|
|
|
}
|
|
|
|
|
2011-05-28 07:45:59 +00:00
|
|
|
; CHECK: define void @test0_out()
|
|
|
|
; CHECK: [[A:%.*]] = alloca %struct.A,
|
|
|
|
; CHECK: [[B:%.*]] = alloca %struct.A,
|
|
|
|
; CHECK: invoke void @_ZN1AC1Ev(%struct.A* [[A]])
|
|
|
|
; CHECK: invoke void @_ZN1AC1Ev(%struct.A* [[B]])
|
|
|
|
; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[B]])
|
|
|
|
; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[A]])
|
2011-09-02 01:25:11 +00:00
|
|
|
; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: cleanup
|
|
|
|
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-05-27 18:34:38 +00:00
|
|
|
; CHECK-NEXT: invoke void @_ZN1AD1Ev(%struct.A* [[A]])
|
|
|
|
; CHECK-NEXT: to label %[[LBL:[^\s]+]] unwind
|
|
|
|
; CHECK: [[LBL]]:
|
|
|
|
; CHECK-NEXT: br label %[[LPAD:[^\s]+]]
|
2011-05-28 07:45:59 +00:00
|
|
|
; CHECK: ret void
|
2011-09-02 01:25:11 +00:00
|
|
|
; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-05-28 07:45:59 +00:00
|
|
|
; CHECK-NEXT: br label %[[LPAD]]
|
|
|
|
; CHECK: [[LPAD]]:
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: phi { i8*, i32 } [
|
|
|
|
; CHECK-NEXT: extractvalue { i8*, i32 }
|
|
|
|
; CHECK-NEXT: extractvalue { i8*, i32 }
|
2011-05-30 01:08:04 +00:00
|
|
|
; CHECK-NEXT: call i32 @llvm.eh.typeid.for(
|
|
|
|
|
|
|
|
|
2011-06-01 02:17:11 +00:00
|
|
|
;; Test 1 - Correctly handle phis in outer landing pads.
|
2011-05-30 01:08:04 +00:00
|
|
|
|
|
|
|
define void @test1_out() uwtable ssp {
|
|
|
|
entry:
|
|
|
|
invoke void @test0_in()
|
|
|
|
to label %cont unwind label %lpad
|
|
|
|
|
|
|
|
cont:
|
|
|
|
invoke void @test0_in()
|
|
|
|
to label %ret unwind label %lpad
|
|
|
|
|
|
|
|
ret:
|
|
|
|
ret void
|
|
|
|
|
|
|
|
lpad:
|
|
|
|
%x = phi i32 [ 0, %entry ], [ 1, %cont ]
|
|
|
|
%y = phi i32 [ 1, %entry ], [ 4, %cont ]
|
2011-09-02 01:25:11 +00:00
|
|
|
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
|
|
|
catch i8* bitcast (i8** @_ZTIi to i8*)
|
|
|
|
%eh.exc = extractvalue { i8*, i32 } %exn, 0
|
|
|
|
%eh.selector = extractvalue { i8*, i32 } %exn, 1
|
2011-05-30 01:08:04 +00:00
|
|
|
%0 = call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) nounwind
|
|
|
|
%1 = icmp eq i32 %eh.selector, %0
|
|
|
|
br i1 %1, label %catch, label %eh.resume
|
|
|
|
|
|
|
|
catch:
|
2011-09-02 01:25:11 +00:00
|
|
|
%ignored = call i8* @__cxa_begin_catch(i8* %eh.exc) nounwind
|
2011-05-30 01:08:04 +00:00
|
|
|
call void @use(i32 %x)
|
|
|
|
call void @use(i32 %y)
|
|
|
|
call void @__cxa_end_catch() nounwind
|
|
|
|
br label %ret
|
|
|
|
|
|
|
|
eh.resume:
|
2011-09-02 01:25:11 +00:00
|
|
|
resume { i8*, i32 } %exn
|
2011-05-30 01:08:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK: define void @test1_out()
|
|
|
|
; CHECK: [[A2:%.*]] = alloca %struct.A,
|
|
|
|
; CHECK: [[B2:%.*]] = alloca %struct.A,
|
|
|
|
; CHECK: [[A1:%.*]] = alloca %struct.A,
|
|
|
|
; CHECK: [[B1:%.*]] = alloca %struct.A,
|
|
|
|
; CHECK: invoke void @_ZN1AC1Ev(%struct.A* [[A1]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD:[^\s]+]]
|
|
|
|
; CHECK: invoke void @_ZN1AC1Ev(%struct.A* [[B1]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD1:[^\s]+]]
|
|
|
|
; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[B1]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD1]]
|
|
|
|
; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[A1]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD]]
|
|
|
|
|
|
|
|
; Inner landing pad from first inlining.
|
|
|
|
; CHECK: [[LPAD1]]:
|
2011-09-02 01:25:11 +00:00
|
|
|
; CHECK-NEXT: [[LPADVAL1:%.*]] = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: cleanup
|
|
|
|
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-05-30 01:08:04 +00:00
|
|
|
; CHECK-NEXT: invoke void @_ZN1AD1Ev(%struct.A* [[A1]])
|
|
|
|
; CHECK-NEXT: to label %[[RESUME1:[^\s]+]] unwind
|
|
|
|
; CHECK: [[RESUME1]]:
|
|
|
|
; CHECK-NEXT: br label %[[LPAD_JOIN1:[^\s]+]]
|
|
|
|
|
|
|
|
; CHECK: invoke void @_ZN1AC1Ev(%struct.A* [[A2]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD]]
|
|
|
|
; CHECK: invoke void @_ZN1AC1Ev(%struct.A* [[B2]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD2:[^\s]+]]
|
|
|
|
; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[B2]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD2]]
|
|
|
|
; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[A2]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD]]
|
|
|
|
|
|
|
|
; Inner landing pad from second inlining.
|
|
|
|
; CHECK: [[LPAD2]]:
|
2011-09-02 01:25:11 +00:00
|
|
|
; CHECK-NEXT: [[LPADVAL2:%.*]] = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: cleanup
|
|
|
|
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-05-30 01:08:04 +00:00
|
|
|
; CHECK-NEXT: invoke void @_ZN1AD1Ev(%struct.A* [[A2]])
|
|
|
|
; CHECK-NEXT: to label %[[RESUME2:[^\s]+]] unwind
|
|
|
|
; CHECK: [[RESUME2]]:
|
|
|
|
; CHECK-NEXT: br label %[[LPAD_JOIN2:[^\s]+]]
|
|
|
|
|
|
|
|
; CHECK: ret void
|
|
|
|
|
|
|
|
; CHECK: [[LPAD]]:
|
|
|
|
; CHECK-NEXT: [[X:%.*]] = phi i32 [ 0, %entry ], [ 0, {{%.*}} ], [ 1, %cont ], [ 1, {{%.*}} ]
|
|
|
|
; CHECK-NEXT: [[Y:%.*]] = phi i32 [ 1, %entry ], [ 1, {{%.*}} ], [ 4, %cont ], [ 4, {{%.*}} ]
|
2011-09-02 01:25:11 +00:00
|
|
|
; CHECK-NEXT: [[LPADVAL:%.*]] = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-05-30 01:08:04 +00:00
|
|
|
; CHECK-NEXT: br label %[[LPAD_JOIN2]]
|
|
|
|
|
|
|
|
; CHECK: [[LPAD_JOIN2]]:
|
|
|
|
; CHECK-NEXT: [[XJ2:%.*]] = phi i32 [ [[X]], %[[LPAD]] ], [ 1, %[[RESUME2]] ]
|
|
|
|
; CHECK-NEXT: [[YJ2:%.*]] = phi i32 [ [[Y]], %[[LPAD]] ], [ 4, %[[RESUME2]] ]
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: [[EXNJ2:%.*]] = phi { i8*, i32 } [ [[LPADVAL]], %[[LPAD]] ], [ [[LPADVAL2]], %[[RESUME2]] ]
|
2011-05-30 01:08:04 +00:00
|
|
|
; CHECK-NEXT: br label %[[LPAD_JOIN1]]
|
|
|
|
|
|
|
|
; CHECK: [[LPAD_JOIN1]]:
|
|
|
|
; CHECK-NEXT: [[XJ1:%.*]] = phi i32 [ [[XJ2]], %[[LPAD_JOIN2]] ], [ 0, %[[RESUME1]] ]
|
|
|
|
; CHECK-NEXT: [[YJ1:%.*]] = phi i32 [ [[YJ2]], %[[LPAD_JOIN2]] ], [ 1, %[[RESUME1]] ]
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: [[EXNJ1:%.*]] = phi { i8*, i32 } [ [[EXNJ2]], %[[LPAD_JOIN2]] ], [ [[LPADVAL1]], %[[RESUME1]] ]
|
|
|
|
; CHECK-NEXT: extractvalue { i8*, i32 } [[EXNJ1]], 0
|
|
|
|
; CHECK-NEXT: [[SELJ1:%.*]] = extractvalue { i8*, i32 } [[EXNJ1]], 1
|
2011-05-30 01:08:04 +00:00
|
|
|
; CHECK-NEXT: [[T:%.*]] = call i32 @llvm.eh.typeid.for(
|
|
|
|
; CHECK-NEXT: icmp eq i32 [[SELJ1]], [[T]]
|
|
|
|
|
|
|
|
; CHECK: call void @use(i32 [[XJ1]])
|
|
|
|
; CHECK: call void @use(i32 [[YJ1]])
|
|
|
|
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK: resume { i8*, i32 }
|
2011-06-01 02:17:11 +00:00
|
|
|
|
|
|
|
|
2011-06-09 20:06:24 +00:00
|
|
|
;; Test 2 - Don't make invalid IR for inlines into landing pads without eh.exception calls
|
2011-06-01 02:17:11 +00:00
|
|
|
define void @test2_out() uwtable ssp {
|
|
|
|
entry:
|
|
|
|
invoke void @test0_in()
|
|
|
|
to label %ret unwind label %lpad
|
|
|
|
|
|
|
|
ret:
|
|
|
|
ret void
|
|
|
|
|
|
|
|
lpad:
|
2011-09-02 01:25:11 +00:00
|
|
|
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
|
|
|
cleanup
|
2011-06-01 02:17:11 +00:00
|
|
|
call void @_ZSt9terminatev()
|
|
|
|
unreachable
|
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK: define void @test2_out()
|
|
|
|
; CHECK: [[A:%.*]] = alloca %struct.A,
|
|
|
|
; CHECK: [[B:%.*]] = alloca %struct.A,
|
|
|
|
; CHECK: invoke void @_ZN1AC1Ev(%struct.A* [[A]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD:[^\s]+]]
|
|
|
|
; CHECK: invoke void @_ZN1AC1Ev(%struct.A* [[B]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD2:[^\s]+]]
|
|
|
|
; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[B]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD2]]
|
|
|
|
; CHECK: invoke void @_ZN1AD1Ev(%struct.A* [[A]])
|
|
|
|
; CHECK-NEXT: unwind label %[[LPAD]]
|
2011-06-09 20:06:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
;; Test 3 - Deal correctly with split unwind edges.
|
|
|
|
define void @test3_out() uwtable ssp {
|
|
|
|
entry:
|
|
|
|
invoke void @test0_in()
|
|
|
|
to label %ret unwind label %lpad
|
|
|
|
|
|
|
|
ret:
|
|
|
|
ret void
|
|
|
|
|
|
|
|
lpad:
|
2011-09-02 01:25:11 +00:00
|
|
|
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
|
|
|
catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-06-09 20:06:24 +00:00
|
|
|
br label %lpad.cont
|
|
|
|
|
|
|
|
lpad.cont:
|
|
|
|
call void @_ZSt9terminatev()
|
|
|
|
unreachable
|
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK: define void @test3_out()
|
2011-09-02 01:25:11 +00:00
|
|
|
; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: cleanup
|
|
|
|
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-06-09 20:06:24 +00:00
|
|
|
; CHECK-NEXT: invoke void @_ZN1AD1Ev(
|
|
|
|
; CHECK-NEXT: to label %[[L:[^\s]+]] unwind
|
|
|
|
; CHECK: [[L]]:
|
|
|
|
; CHECK-NEXT: br label %[[JOIN:[^\s]+]]
|
|
|
|
; CHECK: [[JOIN]]:
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: phi { i8*, i32 }
|
2011-06-09 20:06:24 +00:00
|
|
|
; CHECK-NEXT: br label %lpad.cont
|
|
|
|
; CHECK: lpad.cont:
|
|
|
|
; CHECK-NEXT: call void @_ZSt9terminatev()
|
|
|
|
|
|
|
|
|
|
|
|
;; Test 4 - Split unwind edges with a dominance problem
|
|
|
|
define void @test4_out() uwtable ssp {
|
|
|
|
entry:
|
|
|
|
invoke void @test0_in()
|
|
|
|
to label %cont unwind label %lpad.crit
|
|
|
|
|
|
|
|
cont:
|
|
|
|
invoke void @opaque()
|
|
|
|
to label %ret unwind label %lpad
|
|
|
|
|
|
|
|
ret:
|
|
|
|
ret void
|
|
|
|
|
|
|
|
lpad.crit:
|
2011-09-02 01:25:11 +00:00
|
|
|
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
|
|
|
catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-06-09 20:06:24 +00:00
|
|
|
call void @opaque() nounwind
|
2011-08-27 06:11:03 +00:00
|
|
|
br label %terminate
|
2011-06-09 20:06:24 +00:00
|
|
|
|
|
|
|
lpad:
|
2011-09-02 01:25:11 +00:00
|
|
|
%exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
|
|
|
catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-08-27 06:11:03 +00:00
|
|
|
br label %terminate
|
|
|
|
|
|
|
|
terminate:
|
|
|
|
%phi = phi i32 [ 0, %lpad.crit ], [ 1, %lpad ]
|
2011-06-09 20:06:24 +00:00
|
|
|
call void @use(i32 %phi)
|
|
|
|
call void @_ZSt9terminatev()
|
|
|
|
unreachable
|
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK: define void @test4_out()
|
2011-09-02 01:25:11 +00:00
|
|
|
; CHECK: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: cleanup
|
|
|
|
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-06-09 20:06:24 +00:00
|
|
|
; CHECK-NEXT: invoke void @_ZN1AD1Ev(
|
|
|
|
; CHECK-NEXT: to label %[[L:[^\s]+]] unwind
|
|
|
|
; CHECK: [[L]]:
|
|
|
|
; CHECK-NEXT: br label %[[JOIN:[^\s]+]]
|
|
|
|
; CHECK: invoke void @opaque()
|
|
|
|
; CHECK-NEXT: unwind label %lpad
|
|
|
|
; CHECK: lpad.crit:
|
2011-09-02 01:25:11 +00:00
|
|
|
; CHECK-NEXT: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-06-09 20:06:24 +00:00
|
|
|
; CHECK-NEXT: br label %[[JOIN]]
|
|
|
|
; CHECK: [[JOIN]]:
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: phi { i8*, i32 }
|
2011-06-09 20:06:24 +00:00
|
|
|
; CHECK-NEXT: call void @opaque() nounwind
|
|
|
|
; CHECK-NEXT: br label %[[FIX:[^\s]+]]
|
|
|
|
; CHECK: lpad:
|
2011-09-02 01:25:11 +00:00
|
|
|
; CHECK-NEXT: landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: catch i8* bitcast (i8** @_ZTIi to i8*)
|
2011-06-09 20:06:24 +00:00
|
|
|
; CHECK-NEXT: br label %[[FIX]]
|
|
|
|
; CHECK: [[FIX]]:
|
2011-08-27 06:11:03 +00:00
|
|
|
; CHECK-NEXT: [[T1:%.*]] = phi i32 [ 0, %[[JOIN]] ], [ 1, %lpad ]
|
2011-06-09 20:06:24 +00:00
|
|
|
; CHECK-NEXT: call void @use(i32 [[T1]])
|
|
|
|
; CHECK-NEXT: call void @_ZSt9terminatev()
|