[llvm-commits] [llvm] r155785 - /llvm/trunk/include/llvm/CodeGen/ValueTypes.h
Craig Topper
craig.topper at gmail.com
Sun Apr 29 00:06:59 PDT 2012
Author: ctopper
Date: Sun Apr 29 02:06:58 2012
New Revision: 155785
URL: http://llvm.org/viewvc/llvm-project?rev=155785&view=rev
Log:
Mark the default cases of MVT::getVectorElementType and MVT:getVectorNumElements as unreachable to reduce code size.
Modified:
llvm/trunk/include/llvm/CodeGen/ValueTypes.h
Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=155785&r1=155784&r2=155785&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Sun Apr 29 02:06:58 2012
@@ -196,7 +196,7 @@
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 @@
unsigned getVectorNumElements() const {
switch (SimpleTy) {
default:
- return ~0U;
+ llvm_unreachable("Not a vector MVT!");
case v32i8: return 32;
case v16i8:
case v16i16: return 16;
More information about the llvm-commits
mailing list