mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
I am doing this separately from the actual change to eliminate the option to make it easier to review.
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -dce -sil-inline-threshold=1 | %FileCheck %s
|
|
|
|
sil_stage canonical
|
|
|
|
import Builtin
|
|
|
|
// CHECK-LABEL: @caller_of_noinline
|
|
sil @caller_of_noinline : $@convention(thin) () -> () {
|
|
bb0:
|
|
// CHECK-NOT: function_ref @noinline_callee
|
|
// CHECK-NOT: apply
|
|
%0 = function_ref @noinline_callee : $@convention(thin) (Builtin.Int64) -> Builtin.Int64
|
|
%2 = integer_literal $Builtin.Int64, 0
|
|
%3 = apply %0(%2) : $@convention(thin) (Builtin.Int64) -> Builtin.Int64
|
|
%4 = tuple ()
|
|
return %4 : $()
|
|
}
|
|
// CHECK-LABEL: [always_inline] @noinline_callee
|
|
sil [always_inline] @noinline_callee : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
|
|
bb0(%0 : $Builtin.Int64):
|
|
%2 = integer_literal $Builtin.Int1, 0
|
|
%3 = builtin "umul_with_overflow_Int64"(%0 : $Builtin.Int64, %0 : $Builtin.Int64, %2 : $Builtin.Int1) : $(Builtin.Int64, Builtin.Int1)
|
|
%4 = tuple_extract %3 : $(Builtin.Int64, Builtin.Int1), 0
|
|
%5 = builtin "umul_with_overflow_Int64"(%4 : $Builtin.Int64, %4 : $Builtin.Int64, %2 : $Builtin.Int1) : $(Builtin.Int64, Builtin.Int1)
|
|
%6 = tuple_extract %5 : $(Builtin.Int64, Builtin.Int1), 0
|
|
return %6 : $Builtin.Int64
|
|
}
|
|
|