2013-02-27 03:11:57 +01:00
|
|
|
; RUN: llc < %s -mtriple=armv7-apple-ios | FileCheck %s
|
|
|
|
; This testcase makes sure we can handle invoke @llvm.donothing without
|
|
|
|
; assertion failure.
|
2013-03-08 03:21:08 +01:00
|
|
|
; <rdar://problem/13228754> & <rdar://problem/13316637>
|
2013-02-27 03:11:57 +01:00
|
|
|
|
2013-03-08 03:21:08 +01:00
|
|
|
; CHECK: .globl _foo
|
2015-06-17 22:52:32 +02:00
|
|
|
define void @foo() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) {
|
2013-02-27 03:11:57 +01:00
|
|
|
invoke.cont:
|
|
|
|
invoke void @callA()
|
|
|
|
to label %invoke.cont25 unwind label %lpad2
|
|
|
|
invoke.cont25:
|
|
|
|
invoke void @llvm.donothing()
|
|
|
|
to label %invoke.cont27 unwind label %lpad15
|
|
|
|
|
|
|
|
invoke.cont27:
|
|
|
|
invoke void @callB()
|
|
|
|
to label %invoke.cont75 unwind label %lpad15
|
|
|
|
|
|
|
|
invoke.cont75:
|
|
|
|
ret void
|
|
|
|
|
|
|
|
lpad2:
|
2015-06-17 22:52:32 +02:00
|
|
|
%0 = landingpad { i8*, i32 }
|
2013-02-27 03:11:57 +01:00
|
|
|
cleanup
|
|
|
|
br label %eh.resume
|
|
|
|
|
|
|
|
lpad15:
|
2015-06-17 22:52:32 +02:00
|
|
|
%1 = landingpad { i8*, i32 }
|
2013-02-27 03:11:57 +01:00
|
|
|
cleanup
|
|
|
|
br label %eh.resume
|
|
|
|
|
|
|
|
eh.resume:
|
|
|
|
resume { i8*, i32 } zeroinitializer
|
|
|
|
}
|
|
|
|
|
2013-03-08 03:21:08 +01:00
|
|
|
; CHECK: .globl _bar
|
2015-06-17 22:52:32 +02:00
|
|
|
define linkonce_odr void @bar(i32* %a) personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) {
|
2013-03-08 03:21:08 +01:00
|
|
|
if.end.i.i.i:
|
|
|
|
invoke void @llvm.donothing()
|
|
|
|
to label %call.i.i.i.noexc unwind label %eh.resume
|
|
|
|
|
|
|
|
call.i.i.i.noexc:
|
|
|
|
br i1 false, label %cleanup, label %new.notnull.i.i
|
|
|
|
|
|
|
|
new.notnull.i.i:
|
|
|
|
br label %cleanup
|
|
|
|
|
|
|
|
cleanup:
|
2015-02-27 22:17:42 +01:00
|
|
|
%0 = load i32, i32* %a, align 4
|
2013-03-08 03:21:08 +01:00
|
|
|
%inc294 = add nsw i32 %0, 4
|
|
|
|
store i32 %inc294, i32* %a, align 4
|
|
|
|
br i1 false, label %_ZN3lol5ArrayIivvvvvvvED1Ev.exit, label %delete.notnull.i.i.i1409
|
|
|
|
|
|
|
|
delete.notnull.i.i.i1409:
|
|
|
|
br label %_ZN3lol5ArrayIivvvvvvvED1Ev.exit
|
|
|
|
|
|
|
|
_ZN3lol5ArrayIivvvvvvvED1Ev.exit:
|
|
|
|
ret void
|
|
|
|
|
|
|
|
eh.resume:
|
2015-06-17 22:52:32 +02:00
|
|
|
%1 = landingpad { i8*, i32 }
|
2013-03-08 03:21:08 +01:00
|
|
|
cleanup
|
|
|
|
%2 = extractvalue { i8*, i32 } %1, 0
|
|
|
|
%3 = extractvalue { i8*, i32 } %1, 1
|
|
|
|
%lpad.val = insertvalue { i8*, i32 } undef, i8* %2, 0
|
|
|
|
%lpad.val395 = insertvalue { i8*, i32 } %lpad.val, i32 %3, 1
|
|
|
|
resume { i8*, i32 } %lpad.val395
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @callA()
|
2013-02-27 03:11:57 +01:00
|
|
|
declare void @callB()
|
|
|
|
declare void @llvm.donothing() nounwind readnone
|
2013-03-08 03:21:08 +01:00
|
|
|
declare i32 @__gxx_personality_sj0(...)
|