aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/SROA.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp
index 1b3e8f9baf..04e350c25f 100644
--- a/lib/Transforms/Scalar/SROA.cpp
+++ b/lib/Transforms/Scalar/SROA.cpp
@@ -2272,8 +2272,9 @@ private:
getName(".insert"));
}
- Value *Store = IRB.CreateStore(Src, DstPtr, II.isVolatile());
- (void)Store;
+ StoreInst *Store = cast<StoreInst>(IRB.CreateStore(Src, DstPtr,
+ II.isVolatile()));
+ Store->setAlignment(II.getAlignment());
DEBUG(dbgs() << " to: " << *Store << "\n");
return !II.isVolatile();
}