[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Apr 1 21:40:41 PST 2006



Changes in directory llvm/lib/VMCore:

Type.cpp updated: 1.137 -> 1.138
---
Log message:

vector casts never reinterpret bits


---
Diffs of the changes:  (+5 -0)

 Type.cpp |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.137 llvm/lib/VMCore/Type.cpp:1.138
--- llvm/lib/VMCore/Type.cpp:1.137	Wed Nov 16 00:09:47 2005
+++ llvm/lib/VMCore/Type.cpp	Sat Apr  1 23:40:28 2006
@@ -75,6 +75,11 @@
 //
 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;
 






More information about the llvm-commits mailing list