File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
lib/SILOptimizer/Analysis Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -154,10 +154,15 @@ void DifferentiableActivityInfo::propagateVaried(
154154 propagateVariedInwardsThroughProjections (si->getDest (), i); \
155155 }
156156 PROPAGATE_VARIED_THROUGH_STORE (Store)
157- PROPAGATE_VARIED_THROUGH_STORE (StoreBorrow)
158157 PROPAGATE_VARIED_THROUGH_STORE (CopyAddr)
159158 PROPAGATE_VARIED_THROUGH_STORE (UnconditionalCheckedCastAddr)
160159#undef PROPAGATE_VARIED_THROUGH_STORE
160+ else if (auto *sbi = dyn_cast<StoreBorrowInst>(inst)) {
161+ if (isVaried (sbi->getSrc (), i)) {
162+ setVariedAndPropagateToUsers (sbi, i);
163+ propagateVariedInwardsThroughProjections (sbi, i);
164+ }
165+ }
161166 // Handle `tuple_element_addr`.
162167 else if (auto *teai = dyn_cast<TupleElementAddrInst>(inst)) {
163168 if (isVaried (teai->getOperand (), i)) {
You can’t perform that action at this time.
0 commit comments