File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
lib/SILOptimizer/SILCombiner Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -1961,7 +1961,7 @@ SILInstruction *SILCombiner::visitMarkDependenceInst(MarkDependenceInst *mdi) {
19611961 // does not have a meaning, so just eliminate it.
19621962 {
19631963 SILType baseType = mdi->getBase ()->getType ();
1964- if (baseType.isObject () && baseType .isTrivial (*mdi->getFunction ())) {
1964+ if (baseType.getObjectType () .isTrivial (*mdi->getFunction ())) {
19651965 SILValue value = mdi->getValue ();
19661966 mdi->replaceAllUsesWith (value);
19671967 return eraseInstFromFunction (*mdi);
Original file line number Diff line number Diff line change @@ -3785,6 +3785,22 @@ bb0(%0 : $B):
37853785 return %2 : $B
37863786}
37873787
3788+ // CHECK-LABEL: sil @mark_dependence_trivial_address_base :
3789+ // CHECK: bb0(
3790+ // CHECK-NEXT: strong_retain
3791+ // CHECK-NEXT: alloc_stack $Int
3792+ // CHECK-NEXT: dealloc_stack
3793+ // CHECK-NEXT: return
3794+ // CHECK: } // end sil function 'mark_dependence_trivial_address_base'
3795+ sil @mark_dependence_trivial_address_base : $@convention(thin) (@guaranteed B) -> @owned B {
3796+ bb0(%0 : $B):
3797+ strong_retain %0 : $B
3798+ %1 = alloc_stack $Int
3799+ %2 = mark_dependence %0 : $B on %1 : $*Int
3800+ dealloc_stack %1 : $*Int
3801+ return %2 : $B
3802+ }
3803+
37883804protocol _NSArrayCore {}
37893805
37903806// CHECK-LABEL: sil @mark_dependence_base2
You can’t perform that action at this time.
0 commit comments