diff options
author | Dan Gohman <gohman@apple.com> | 2009-12-11 21:31:27 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-12-11 21:31:27 +0000 |
commit | 87862e77bbf90cf1b68c9eea1f3641ad81435e38 (patch) | |
tree | daf3f31f6a1a8732160f7fd891a085a53a783f6f /include | |
parent | c8f9e4fdc584c6bf48dc0f42083d05b707024b20 (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/ValueTypes.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index 45ef9b9304..3106213e5d 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -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 { |