Fix Transforms/ScalarRepl/2006-04-20-PromoteCrash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27912 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-04-20 20:48:50 +00:00
parent bcce6c2a0f
commit df4f226cdc

View File

@ -143,7 +143,7 @@ bool SROA::performScalarRepl(Function &F) {
// simple scalar value that can be mem2reg'd into a register value. // simple scalar value that can be mem2reg'd into a register value.
bool IsNotTrivial = false; bool IsNotTrivial = false;
if (const Type *ActualType = CanConvertToScalar(AI, IsNotTrivial)) if (const Type *ActualType = CanConvertToScalar(AI, IsNotTrivial))
if (IsNotTrivial) { if (IsNotTrivial && ActualType != Type::VoidTy) {
ConvertToScalar(AI, ActualType); ConvertToScalar(AI, ActualType);
Changed = true; Changed = true;
continue; continue;