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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nadav Rotem 2011-06-17 20:54:12 +00:00
parent 6d6c55bc27
commit da26ad501b
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