We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
differential_function
1 parent 09f6f4f commit 51628ddCopy full SHA for 51628dd
lib/SILOptimizer/SILCombiner/SILCombinerCastVisitors.cpp
@@ -1020,6 +1020,11 @@ SILCombiner::visitConvertFunctionInst(ConvertFunctionInst *cfi) {
1020
// %vjp' = convert_function %vjp
1021
// %y = differentiable_function(%orig', %jvp', %vjp')
1022
if (auto *DFI = dyn_cast<DifferentiableFunctionInst>(cfi->getOperand())) {
1023
+ // Workaround for a problem with OSSA: https://github.com/swiftlang/swift/issues/78848
1024
+ // TODO: remove this if-statement once the underlying problem is fixed.
1025
+ if (cfi->getFunction()->hasOwnership())
1026
+ return nullptr;
1027
+
1028
auto createConvertFunctionOfComponent =
1029
[&](NormalDifferentiableFunctionTypeComponent extractee) {
1030
if (!DFI->hasExtractee(extractee))
0 commit comments