diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-03-17 14:53:37 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-03-17 14:53:37 +0000 |
commit | 7bbf0ee97c77f7712154648a44ac6eeb57886462 (patch) | |
tree | 9e93ea5f729b56a880a474c259310737fc8547ac /include | |
parent | 9e69ff914d8ea054c1dbfd40cd63281c5b087163 (diff) | |
download | llvm-7bbf0ee97c77f7712154648a44ac6eeb57886462.tar.gz llvm-7bbf0ee97c77f7712154648a44ac6eeb57886462.tar.bz2 llvm-7bbf0ee97c77f7712154648a44ac6eeb57886462.tar.xz |
Move more logic into getTypeForExtArgOrReturn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index bf1188ffdf..5b3f2b35bf 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -1293,9 +1293,10 @@ public: /// but this is not true all the time, e.g. i1 on x86-64. It is also not /// necessary for non-C calling conventions. The frontend should handle this /// and include all of the necessary information. - virtual MVT - getTypeForExtArgOrReturn(EVT VT, ISD::NodeType ExtendKind) const { - return MVT::i32; + virtual EVT getTypeForExtArgOrReturn(LLVMContext &Context, EVT VT, + ISD::NodeType ExtendKind) const { + EVT MinVT = getRegisterType(Context, MVT::i32); + return VT.bitsLT(MinVT) ? MinVT : VT; } /// LowerOperationWrapper - This callback is invoked by the type legalizer |