diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 6024d827d3..8b5ff3c427 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -637,8 +637,7 @@ DValue *DtoCastVector(Loc &loc, DValue *val, Type *to) { LLValue *vector = DtoRVal(val); IF_LOG Logger::cout() << "src: " << *vector << "to type: " << *tolltype << " (creating temporary)\n"; - LLValue *array = DtoAlloca(to); - DtoStore(vector, DtoBitCast(array, getPtrToType(vector->getType()))); + LLValue *array = DtoAllocaDump(vector, tolltype, DtoAlignment(val->type)); return new DLValue(to, array); } if (totype->ty == Tvector && to->size() == val->type->size()) {