Skip to content

Commit efba836

Browse files
authored
Merge pull request #22013 from gottesmm/pr-651a3baecca3c91ecdb06d2ef012dbe8fb0d13b0
2 parents a57dee1 + 8e85d60 commit efba836

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/SILOptimizer/Mandatory/PMOMemoryUseCollector.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ bool ElementUseCollector::collectUses(SILValue Pointer) {
273273
auto Kind = ([&]() -> PMOUseKind {
274274
if (UI->getOperandNumber() == CopyAddrInst::Src)
275275
return PMOUseKind::Load;
276+
if (PointeeType.isTrivial(CAI->getModule()))
277+
return PMOUseKind::InitOrAssign;
276278
if (CAI->isInitializationOfDest())
277279
return PMOUseKind::Initialization;
278280
return PMOUseKind::Assign;

lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ void AvailableValueDataflowContext::explodeCopyAddr(CopyAddrInst *CAI) {
911911
assert((LoadUse.isValid() || StoreUse.isValid()) &&
912912
"we should have a load or a store, possibly both");
913913
assert(StoreUse.isInvalid() || StoreUse.Kind == Assign ||
914-
StoreUse.Kind == Initialization);
914+
StoreUse.Kind == Initialization || StoreUse.Kind == InitOrAssign);
915915

916916
// Now that we've emitted a bunch of instructions, including a load and store
917917
// but also including other stuff, update the internal state of

0 commit comments

Comments
 (0)