aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-12 04:24:41 +0000
committerChris Lattner <sabre@nondot.org>2006-12-12 04:24:41 +0000
commita30fc5ed0430081f6495b33e027b7655ca2a66e5 (patch)
treebe32267478e1604d88b18d74710bb0872d427ce3
parentbcb56d81045f46a939b872a111f39256bd38aa38 (diff)
Patch for PR1045 and Transforms/ScalarRepl/2006-12-11-SROA-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32468 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 764cda69e3..080d8115ff 100644
--- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -433,6 +433,8 @@ static bool MergeInType(const Type *In, const Type *&Accum,
const PackedType *PTy;
if (Accum == Type::VoidTy || In == Accum) {
Accum = In;
+ } else if (In == Type::VoidTy) {
+ // Noop.
} else if (In->isIntegral() && Accum->isIntegral()) { // integer union.
// Otherwise pick whichever type is larger.
if (In->getTypeID() > Accum->getTypeID())