From: Chris Lattner Date: Sun, 2 Apr 2006 05:40:28 +0000 (+0000) Subject: vector casts never reinterpret bits X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a3124a3d1eb4349d22b4abaac3a08b4d112d87a5;p=oota-llvm.git vector casts never reinterpret bits git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27354 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 59467c2122a..767df24f279 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -75,6 +75,11 @@ const Type *Type::getPrimitiveType(TypeID IDNumber) { // bool Type::isLosslesslyConvertibleTo(const Type *Ty) const { if (this == Ty) return true; + + // Packed type conversions are always bitwise. + if (isa(this) && isa(Ty)) + return true; + if ((!isPrimitiveType() && !isa(this)) || (!isa(Ty) && !Ty->isPrimitiveType())) return false;