diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-06-17 20:54:12 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-06-17 20:54:12 +0000 |
commit | da26ad501b9125c323f58f756826cf17114a9e6f (patch) | |
tree | 5d69d8dc22c6e915617439931a7c1c5990673921 /include | |
parent | 6d6c55bc270d1bee8561d3ce00d2ca9ced3bb506 (diff) | |
download | external_llvm-da26ad501b9125c323f58f756826cf17114a9e6f.zip external_llvm-da26ad501b9125c323f58f756826cf17114a9e6f.tar.gz external_llvm-da26ad501b9125c323f58f756826cf17114a9e6f.tar.bz2 |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 093e79b..c3f5f2b 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -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)); } |