diff options
author | Justin Holewinski <jholewinski@nvidia.com> | 2012-11-29 14:26:24 +0000 |
---|---|---|
committer | Justin Holewinski <jholewinski@nvidia.com> | 2012-11-29 14:26:24 +0000 |
commit | 3d200255d5b93344c1ab0a5ba4b47a52cfa5893e (patch) | |
tree | 8b2469b4bddabff7cec81ed6a162701eded27e00 /lib/Target/NVPTX/NVPTXISelLowering.h | |
parent | 84af05e1ba3a97d98b76929df858edc7b8b0d252 (diff) | |
download | llvm-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 'lib/Target/NVPTX/NVPTXISelLowering.h')
-rw-r--r-- | lib/Target/NVPTX/NVPTXISelLowering.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/NVPTX/NVPTXISelLowering.h b/lib/Target/NVPTX/NVPTXISelLowering.h index 94a177ceb0..0a1833a7c9 100644 --- a/lib/Target/NVPTX/NVPTXISelLowering.h +++ b/lib/Target/NVPTX/NVPTXISelLowering.h @@ -92,6 +92,8 @@ public: virtual unsigned getFunctionAlignment(const Function *F) const; virtual EVT getSetCCResultType(EVT VT) const { + if (VT.isVector()) + return MVT::getVectorVT(MVT::i1, VT.getVectorNumElements()); return MVT::i1; } @@ -129,6 +131,8 @@ public: return MVT::i32; } + virtual bool shouldSplitVectorElementType(EVT VT) const; + private: const NVPTXSubtarget &nvptxSubtarget; // cache the subtarget here |