diff --git a/lib/IRGen/LoadableByAddress.cpp b/lib/IRGen/LoadableByAddress.cpp index 6b27c7d0c7469..738ad7190b252 100644 --- a/lib/IRGen/LoadableByAddress.cpp +++ b/lib/IRGen/LoadableByAddress.cpp @@ -3773,6 +3773,15 @@ class AssignAddressToDef : SILInstructionVisitor { assignment.mapValueToAddress(origValue, newAddr); assignment.markForDeletion(bc); } + + void visitUncheckedBitwiseCastInst(UncheckedBitwiseCastInst *bc) { + auto builder = assignment.getBuilder(bc->getIterator()); + auto opdAddr = assignment.getAddressForValue(bc->getOperand()); + auto newAddr = builder.createUncheckedAddrCast( + bc->getLoc(), opdAddr, bc->getType().getAddressType()); + assignment.mapValueToAddress(origValue, newAddr); + assignment.markForDeletion(bc); + } }; } // namespace