summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-06-17 20:54:12 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-06-17 20:54:12 +0000
commitda26ad501b9125c323f58f756826cf17114a9e6f (patch)
tree5d69d8dc22c6e915617439931a7c1c5990673921 /include
parent6d6c55bc270d1bee8561d3ce00d2ca9ced3bb506 (diff)
downloadllvm-da26ad501b9125c323f58f756826cf17114a9e6f.tar.gz
llvm-da26ad501b9125c323f58f756826cf17114a9e6f.tar.bz2
llvm-da26ad501b9125c323f58f756826cf17114a9e6f.tar.xz
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.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 093e79b1c1..c3f5f2b2c3 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));
}