File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,8 @@ bool ElementUseCollector::collectUses(SILValue Pointer) {
273
273
auto Kind = ([&]() -> PMOUseKind {
274
274
if (UI->getOperandNumber () == CopyAddrInst::Src)
275
275
return PMOUseKind::Load;
276
+ if (PointeeType.isTrivial (CAI->getModule ()))
277
+ return PMOUseKind::InitOrAssign;
276
278
if (CAI->isInitializationOfDest ())
277
279
return PMOUseKind::Initialization;
278
280
return PMOUseKind::Assign;
Original file line number Diff line number Diff line change @@ -911,7 +911,7 @@ void AvailableValueDataflowContext::explodeCopyAddr(CopyAddrInst *CAI) {
911
911
assert ((LoadUse.isValid () || StoreUse.isValid ()) &&
912
912
" we should have a load or a store, possibly both" );
913
913
assert (StoreUse.isInvalid () || StoreUse.Kind == Assign ||
914
- StoreUse.Kind == Initialization);
914
+ StoreUse.Kind == Initialization || StoreUse. Kind == InitOrAssign );
915
915
916
916
// Now that we've emitted a bunch of instructions, including a load and store
917
917
// but also including other stuff, update the internal state of
You can’t perform that action at this time.
0 commit comments