Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(862)

Unified Diff: lib/Transforms/NaCl/StripAttributes.cpp

Issue 321733002: PNaCl SIMD: allow element-aligned vector load/store (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Add alloca test. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Transforms/NaCl/FixVectorLoadStoreAlignment.cpp ('k') | test/NaCl/Bitcode/vector.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Transforms/NaCl/StripAttributes.cpp
diff --git a/lib/Transforms/NaCl/StripAttributes.cpp b/lib/Transforms/NaCl/StripAttributes.cpp
index a023be7f2f3af1726429749da459d35e25ecb61b..dd26857a6f1622d14efde4af9fa075781473b1a2 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,
jvoung (off chromium) 2014/06/11 16:14:17 trailing comma -> period ? or end with "by the Fi
+ return Alignment;
if (Ty->isDoubleTy() || Ty->isFloatTy() || IsAtomic)
MaxAllowed = DL->getTypeAllocSize(Ty);
// If the alignment is set to 0, this means "use the default
« no previous file with comments | « lib/Transforms/NaCl/FixVectorLoadStoreAlignment.cpp ('k') | test/NaCl/Bitcode/vector.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698