From 39300283c0b05a112eabf3aa644b75738ffaf9cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jernej=20Krempu=C5=A1?= Date: Fri, 5 Oct 2012 19:38:43 +0200 Subject: [PATCH] Made casts between vector types work. --- gen/llvmhelpers.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 9a5a2a82..6af17abd 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -809,6 +809,10 @@ DValue* DtoCastVector(Loc& loc, DValue* val, Type* to) return new DImValue(to, array); } } + else if (totype->ty == Tvector && to->size() == val->getType()->size()) + { + return new DImValue(to, val->getRVal()); + } else { error(loc, "invalid cast from '%s' to '%s'", val->getType()->toChars(), to->toChars());