Implement vector widening, splitting, and scalarizing for SIGN_EXTEND_INREG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91158 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-12-11 21:31:27 +00:00
parent c8f9e4fdc5
commit 87862e77bb
10 changed files with 134 additions and 32 deletions

View File

@@ -166,6 +166,12 @@ namespace llvm {
return *this;
}
}
/// getScalarType - If this is a vector type, return the element type,
/// otherwise return this.
MVT getScalarType() const {
return isVector() ? getVectorElementType() : *this;
}
MVT getVectorElementType() const {
switch (SimpleTy) {
@@ -524,6 +530,12 @@ namespace llvm {
return V;
}
/// getScalarType - If this is a vector type, return the element type,
/// otherwise return this.
EVT getScalarType() const {
return isVector() ? getVectorElementType() : *this;
}
/// getVectorElementType - Given a vector type, return the type of
/// each element.
EVT getVectorElementType() const {