Fix crash when trying to unconditionally cast alloca type to PointerType Differential Revision: https://reviews.llvm.org/D131146