Skip to content

Commit a63078f

Browse files
authored
Add missed case to AssignAddressToDef. (#72617)
Fixes #71744
1 parent 3c62c74 commit a63078f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/IRGen/LoadableByAddress.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3773,6 +3773,15 @@ class AssignAddressToDef : SILInstructionVisitor<AssignAddressToDef> {
37733773
assignment.mapValueToAddress(origValue, newAddr);
37743774
assignment.markForDeletion(bc);
37753775
}
3776+
3777+
void visitUncheckedBitwiseCastInst(UncheckedBitwiseCastInst *bc) {
3778+
auto builder = assignment.getBuilder(bc->getIterator());
3779+
auto opdAddr = assignment.getAddressForValue(bc->getOperand());
3780+
auto newAddr = builder.createUncheckedAddrCast(
3781+
bc->getLoc(), opdAddr, bc->getType().getAddressType());
3782+
assignment.mapValueToAddress(origValue, newAddr);
3783+
assignment.markForDeletion(bc);
3784+
}
37763785
};
37773786
} // namespace
37783787

0 commit comments

Comments
 (0)