Mark the default cases of MVT::getVectorElementType and MVT:getVectorNumElements as unreachable to reduce code size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155785 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2012-04-29 07:06:58 +00:00
parent ff11c01853
commit 9efb030911

View File

@ -196,7 +196,7 @@ namespace llvm {
MVT getVectorElementType() const {
switch (SimpleTy) {
default:
return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
llvm_unreachable("Not a vector MVT!");
case v2i8 :
case v4i8 :
case v8i8 :
@ -225,7 +225,7 @@ namespace llvm {
unsigned getVectorNumElements() const {
switch (SimpleTy) {
default:
return ~0U;
llvm_unreachable("Not a vector MVT!");
case v32i8: return 32;
case v16i8:
case v16i16: return 16;