[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 9 17:41:11 PST 2005
Changes in directory llvm/lib/VMCore:
Type.cpp updated: 1.129 -> 1.130
---
Log message:
Force packed vectors to be a power of two in length.
---
Diffs of the changes: (+2 -0)
Type.cpp | 2 ++
1 files changed, 2 insertions(+)
Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.129 llvm/lib/VMCore/Type.cpp:1.130
--- llvm/lib/VMCore/Type.cpp:1.129 Wed Jul 27 01:12:34 2005
+++ llvm/lib/VMCore/Type.cpp Wed Nov 9 19:40:59 2005
@@ -19,6 +19,7 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/Support/MathExtras.h"
#include <algorithm>
#include <iostream>
using namespace llvm;
@@ -1005,6 +1006,7 @@
PackedType *PackedType::get(const Type *ElementType, unsigned NumElements) {
assert(ElementType && "Can't get packed of null types!");
+ assert(isPowerOf2_32(NumElements) && "Vector length should be a power of 2!");
PackedValType PVT(ElementType, NumElements);
PackedType *PT = PackedTypes.get(PVT);
More information about the llvm-commits
mailing list