Commits

Andrew Trick committed 778012c479a
Handle SIL unchecked_addr_cast conservatively when promoting to a value cast. Unless we can prove that the input and output are layout identical we must use either trivial_bit_cast or bitwise_cast. This changes the lowering to be more conservative for: - Builtin.reinterpretCast - address_to_pointer -> pointer_to_address This also makes LoadStoreOpts more conservative in: - forwardAddrToUncheckedCastToLd In order to commit this without massive performance regressions, I added SILType::canBitCastAsSingleRef. When this is true for both sides of a bitwise case, we can convert it to a RefBitCast, which has RC identity. Swift SVN r30172