We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3211f68 commit dd95922Copy full SHA for dd95922
lib/SILOptimizer/SILCombiner/SILCombinerMiscVisitors.cpp
@@ -2367,6 +2367,11 @@ SILCombiner::visitDifferentiableFunctionExtractInst(DifferentiableFunctionExtrac
2367
// match the type of the original `differentiable_function_extract`,
2368
// create a `convert_function`.
2369
if (newValue->getType() != DFEI->getType()) {
2370
+ CanSILFunctionType opTI = newValue->getType().castTo<SILFunctionType>();
2371
+ CanSILFunctionType resTI = DFEI->getType().castTo<SILFunctionType>();
2372
+ if (!opTI->isABICompatibleWith(resTI, *DFEI->getFunction()).isCompatible())
2373
+ return nullptr;
2374
+
2375
std::tie(newValue, std::ignore) =
2376
castValueToABICompatibleType(&Builder, DFEI->getLoc(),
2377
newValue,
0 commit comments