mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
I am doing this separately from the actual change to eliminate the option to make it easier to review.
28 lines
624 B
Plaintext
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 : $()
|
|
}
|