aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-01-24 19:36:27 +0000
committerChris Lattner <sabre@nondot.org>2006-01-24 19:36:27 +0000
commit15256cb14ef340235122750a8d7a6b18baf62ef0 (patch)
treef5b5b4bb4a301c6ca8a3d94ecc00053f337b501a
parent720d2108be6f44e6d37ca6d0d71004b7be600886 (diff)
Fix Regression/Transforms/ScalarRepl/2006-01-24-IllegalUnionPromoteCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25587 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index be82c38c4a..001f3a5732 100644
--- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -554,9 +554,7 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, unsigned Offset) {
// Convert the stored type to the actual type, shift it left to insert
// then 'or' into place.
Value *SV = SI->getOperand(0);
- if (SV->getType() == NewAI->getType()->getElementType()) {
- assert(Offset == 0 && "Store out of bounds!");
- } else {
+ if (SV->getType() != NewAI->getType()->getElementType() || Offset != 0) {
Value *Old = new LoadInst(NewAI, NewAI->getName()+".in", SI);
// If SV is signed, convert it to unsigned, so that the next cast zero
// extends the value.