Skip to content

Commit e98128e

Browse files
authored
Merge pull request #21025 from gottesmm/swift-5.0-branch-rdar46409354
[5.0] Disable propagateSoleConformingType optimization since it is causing …
2 parents 6dc47f6 + 077e15a commit e98128e

File tree

2 files changed

+131
-124
lines changed

2 files changed

+131
-124
lines changed

lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,12 @@ void SILCombiner::replaceWitnessMethodInst(
623623
SILInstruction *
624624
SILCombiner::propagateSoleConformingType(FullApplySite Apply,
625625
WitnessMethodInst *WMI) {
626+
// Disable this optimization for now since it causes miscompiles.
627+
//
628+
// rdar://46409354
629+
#if 1
630+
return nullptr;
631+
#else
626632
// If WMI has concrete conformance, it can be optimized.
627633
if (WMI->getConformance().isConcrete())
628634
return nullptr;
@@ -700,6 +706,7 @@ SILCombiner::propagateSoleConformingType(FullApplySite Apply,
700706
/// Create the new apply instruction using the concrete type.
701707
auto *NewAI = createApplyWithConcreteType(Apply, CEIs, BuilderCtx);
702708
return NewAI;
709+
#endif
703710
}
704711

705712
/// Given an Apply and an argument value produced by InitExistentialAddrInst,

0 commit comments

Comments
 (0)