mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 12:40:17 +00:00
vector casts never reinterpret bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a1c3538537
commit
a3124a3d1e
@ -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<PackedType>(this) && isa<PackedType>(Ty))
|
||||
return true;
|
||||
|
||||
if ((!isPrimitiveType() && !isa<PointerType>(this)) ||
|
||||
(!isa<PointerType>(Ty) && !Ty->isPrimitiveType())) return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user