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

llvm-svn: 27912
This commit is contained in:
Chris Lattner 2006-04-20 20:48:50 +00:00
parent c11f4f4214
commit dae49df407
1 changed files with 1 additions and 1 deletions

View File

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