-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
AutoDiffSIL ownershipArea → compiler → SIL: SIL ownershipArea → compiler → SIL: SIL ownershipSILOptimizerArea → compiler: SIL optimization passesArea → compiler: SIL optimization passesbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Description
The following test fails ownership verification :
// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine -sil-combine-canonicalize=false
// SILCombine tests for differentiation-related instructions.
sil_stage canonical
import Swift
import _Differentiation
sil [ossa] @test_convert_escape_to_noescape : $@convention(thin) (@owned @callee_guaranteed (Float) -> Float) -> () {
bb0(%0 : @owned $@callee_guaranteed (Float) -> Float):
%diff_fn = differentiable_function [parameters 0] [results 0] %0 : $@callee_guaranteed (Float) -> Float
%1 = convert_escape_to_noescape %diff_fn : $@differentiable(reverse) @callee_guaranteed (Float) -> Float to $@noescape @differentiable(reverse) @callee_guaranteed (Float) -> Float
%3 = apply undef(%1) : $@convention(thin) (@guaranteed @differentiable(reverse) @noescape @callee_guaranteed (Float) -> Float) -> ()
destroy_value %1 : $@noescape @differentiable(reverse) @callee_guaranteed (Float) -> Float
destroy_value %diff_fn : $@differentiable(reverse) @callee_guaranteed (Float) -> Float
return undef : $()
}
Metadata
Metadata
Assignees
Labels
AutoDiffSIL ownershipArea → compiler → SIL: SIL ownershipArea → compiler → SIL: SIL ownershipSILOptimizerArea → compiler: SIL optimization passesArea → compiler: SIL optimization passesbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.