Short term fix for pr12270 before we change dominates to handle unreachable
[oota-llvm.git] / test / Transforms / ObjCARC / pr12270.ll
1 ; RUN: opt -disable-output -objc-arc-contract %s
2 ; test that we don't crash on unreachable code
3 %2 = type opaque
4
5 define void @_i_Test__foo(%2 *%x) {
6 entry:
7   unreachable
8
9 return:                                           ; No predecessors!
10   %bar = bitcast %2* %x to i8*
11   %foo = call i8* @objc_autoreleaseReturnValue(i8* %bar) nounwind
12   ret void
13 }
14
15 declare i8* @objc_autoreleaseReturnValue(i8*)