Files
swift-mirror/test/SILOptimizer/simplify_unreachable_containing_blocks.sil
Michael Gottesman fd4828e40a Eliminate -assume-parsing-unqualified-ownership-sil from tests.
I am doing this separately from the actual change to eliminate the option to
make it easier to review.
2018-12-19 12:54:13 -08:00

28 lines
624 B
Plaintext

// RUN: %target-sil-opt -simplify-unreachable-containing-blocks -module-name Swift -enable-sil-verify-all %s | %FileCheck %s
sil_stage canonical
import Builtin
enum Never {}
sil @blackhole : $@convention(thin) () -> Never
// CHECK-LABEL: sil @test1 : $@convention(thin) () -> () {
// CHECK-NOT: function_ref
// CHECK-NOT: apply
// CHECK: } // end sil function 'test1'
sil @test1 : $@convention(thin) () -> () {
bb0:
cond_br undef, bb1, bb2
bb1:
%0 = function_ref @blackhole : $@convention(thin) () -> Never
apply %0() : $@convention(thin) () -> Never
unreachable
bb2:
%9999 = tuple()
return %9999 : $()
}