Fix a bug in the type-lowering of integer-promoted elements. Add a check that

the newly created simple type is valid before checking its legality.
Re-commit the test file.

llvm-svn: 133291
This commit is contained in:
Nadav Rotem 2011-06-17 20:54:12 +00:00
parent 8e6f5a641d
commit ea7822685a
2 changed files with 1469 additions and 2 deletions

View File

@ -1836,9 +1836,8 @@ private:
// Build a new vector type and check if it is legal.
MVT NVT = MVT::getVectorVT(EltVT.getSimpleVT(), NumElts);
// Found a legal promoted vector type.
if (ValueTypeActions.getTypeAction(NVT) == TypeLegal)
if (NVT != MVT() && ValueTypeActions.getTypeAction(NVT) == TypeLegal)
return LegalizeKind(TypePromoteInteger,
EVT::getVectorVT(Context, EltVT, NumElts));
}

File diff suppressed because it is too large Load Diff