From 9efb030911d05ca4a913a1179f3f5b7d04ae5077 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 29 Apr 2012 07:06:58 +0000 Subject: [PATCH] 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 --- include/llvm/CodeGen/ValueTypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index 76c2357a552..caeca17ac6f 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -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; -- 2.34.1