1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

zap the now unused MVT::getIntVectorWithNumElements

llvm-svn: 112218
This commit is contained in:
Bruno Cardoso Lopes 2010-08-26 20:53:12 +00:00
parent 81e0e2622b
commit 6150648a64
2 changed files with 10 additions and 16 deletions

View File

@ -348,17 +348,6 @@ namespace llvm {
}
return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
}
static MVT getIntVectorWithNumElements(unsigned NumElts) {
switch (NumElts) {
default: return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
case 1: return MVT::v1i64;
case 2: return MVT::v2i32;
case 4: return MVT::v4i16;
case 8: return MVT::v8i8;
case 16: return MVT::v16i8;
}
}
};
struct EVT { // EVT = Extended Value Type
@ -411,10 +400,15 @@ namespace llvm {
/// getIntVectorWithNumElements - Return any integer vector type that has
/// the specified number of elements.
static EVT getIntVectorWithNumElements(LLVMContext &C, unsigned NumElts) {
MVT M = MVT::getIntVectorWithNumElements(NumElts);
if (M.SimpleTy != MVT::INVALID_SIMPLE_VALUE_TYPE)
return M;
return getVectorVT(C, MVT::i8, NumElts);
switch (NumElts) {
default: return getVectorVT(C, MVT::i8, NumElts);
case 1: return MVT::v1i64;
case 2: return MVT::v2i32;
case 4: return MVT::v4i16;
case 8: return MVT::v8i8;
case 16: return MVT::v16i8;
}
return MVT::INVALID_SIMPLE_VALUE_TYPE;
}
/// isSimple - Test if the given EVT is simple (as opposed to being

View File

@ -4607,7 +4607,7 @@ SDValue RewriteAsNarrowerShuffle(ShuffleVectorSDNode *SVOp,
SDValue V2 = SVOp->getOperand(1);
unsigned NumElems = VT.getVectorNumElements();
unsigned NewWidth = (NumElems == 4) ? 2 : 4;
EVT MaskVT = MVT::getIntVectorWithNumElements(NewWidth);
EVT MaskVT = (NewWidth == 4) ? MVT::v4i16 : MVT::v2i32;
EVT NewVT = MaskVT;
switch (VT.getSimpleVT().SimpleTy) {
default: assert(false && "Unexpected!");