Files
swift-mirror/test/SILOptimizer/mandatory_inlining_circular.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

27 lines
1.2 KiB
Plaintext

// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -verify
import Builtin
import Swift
sil [transparent] @test_circular_foo : $@convention(thin) (Float32) -> Float32 {
bb0(%0 : $Float32):
%3 = function_ref @test_circular_bar : $@convention(thin) (Float32) -> Float32
%5 = apply %3(%0) : $@convention(thin) (Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
return %5 : $Float32
}
sil [transparent] @test_circular_bar : $@convention(thin) (Float32) -> Float32 {
bb0(%0 : $Float32):
%3 = function_ref @test_circular_baz : $@convention(thin) (Float32) -> Float32
%5 = apply %3(%0) : $@convention(thin) (Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
return %5 : $Float32
}
sil [transparent] @test_circular_baz : $@convention(thin) (Float32) -> Float32 {
bb0(%0 : $Float32):
%3 = function_ref @test_circular_foo : $@convention(thin) (Float32) -> Float32
%5 = apply %3(%0) : $@convention(thin) (Float32) -> Float32 // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 2 {{while inlining here}}
return %5 : $Float32
}