summaryrefslogtreecommitdiff
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorJustin Holewinski <jholewinski@nvidia.com>2012-11-29 14:26:24 +0000
committerJustin Holewinski <jholewinski@nvidia.com>2012-11-29 14:26:24 +0000
commit3d200255d5b93344c1ab0a5ba4b47a52cfa5893e (patch)
tree8b2469b4bddabff7cec81ed6a162701eded27e00 /include/llvm/Target
parent84af05e1ba3a97d98b76929df858edc7b8b0d252 (diff)
downloadllvm-3d200255d5b93344c1ab0a5ba4b47a52cfa5893e.tar.gz
llvm-3d200255d5b93344c1ab0a5ba4b47a52cfa5893e.tar.bz2
llvm-3d200255d5b93344c1ab0a5ba4b47a52cfa5893e.tar.xz
Allow targets to prefer TypeSplitVector over TypePromoteInteger when computing the legalization method for vectors
For some targets, it is desirable to prefer scalarizing <N x i1> instead of promoting to a larger legal type, such as <N x i32>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetLowering.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 580a30fcd2..aaa5f51f35 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -159,6 +159,11 @@ public:
virtual bool isSelectSupported(SelectSupportKind kind) const { return true; }
+ /// shouldSplitVectorElementType - Return true if a vector of the given type
+ /// should be split (TypeSplitVector) instead of promoted
+ /// (TypePromoteInteger) during type legalization.
+ virtual bool shouldSplitVectorElementType(EVT VT) const { return false; }
+
/// isIntDivCheap() - Return true if integer divide is usually cheaper than
/// a sequence of several shifts, adds, and multiplies for this target.
bool isIntDivCheap() const { return IntDivIsCheap; }