Index: lib/Transforms/NaCl/StripAttributes.cpp |
diff --git a/lib/Transforms/NaCl/StripAttributes.cpp b/lib/Transforms/NaCl/StripAttributes.cpp |
index a023be7f2f3af1726429749da459d35e25ecb61b..8d6e3e2451a49104c88e1306376aaa4f58b14840 100644 |
--- a/lib/Transforms/NaCl/StripAttributes.cpp |
+++ b/lib/Transforms/NaCl/StripAttributes.cpp |
@@ -163,6 +163,9 @@ void stripGlobalValueAttrs(GlobalValue *GV) { |
static unsigned normalizeAlignment(DataLayout *DL, unsigned Alignment, |
Type *Ty, bool IsAtomic) { |
unsigned MaxAllowed = 1; |
+ if (isa<VectorType>(Ty)) |
+ // Already handled properly by FixVectorLoadStoreAlignment. |
+ return Alignment; |
if (Ty->isDoubleTy() || Ty->isFloatTy() || IsAtomic) |
MaxAllowed = DL->getTypeAllocSize(Ty); |
// If the alignment is set to 0, this means "use the default |