projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1c3538
)
vector casts never reinterpret bits
author
Chris Lattner
<sabre@nondot.org>
Sun, 2 Apr 2006 05:40:28 +0000
(
05:40
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 2 Apr 2006 05:40:28 +0000
(
05:40
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27354
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Type.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Type.cpp
b/lib/VMCore/Type.cpp
index 59467c2122ab03040fd773de4bfe00bf819e85bf..767df24f279e207358de3c05e391103d95674738 100644
(file)
--- 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<PackedType>(this) && isa<PackedType>(Ty))
+ return true;
+
if ((!isPrimitiveType() && !isa<PointerType>(this)) ||
(!isa<PointerType>(Ty) && !Ty->isPrimitiveType())) return false;