mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
COWArrayOpt: ensure that we can hoist all address projections that we stripped.
This change is needed because we new consider index_addr as address projection in Projection.h
This commit is contained in:
@@ -1433,7 +1433,7 @@ bool COWArrayOpt::hoistMakeMutable(ArraySemanticsCall MakeMutable) {
|
||||
|
||||
// We can hoist address projections (even if they are only conditionally
|
||||
// executed).
|
||||
auto ArrayAddrBase = stripAddressProjections(CurrentArrayAddr);
|
||||
auto ArrayAddrBase = stripUnaryAddressProjections(CurrentArrayAddr);
|
||||
SILBasicBlock *ArrayAddrBaseBB = ArrayAddrBase->getParentBB();
|
||||
|
||||
if (ArrayAddrBaseBB && !DomTree->dominates(ArrayAddrBaseBB, Preheader)) {
|
||||
|
||||
Reference in New Issue
Block a user