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 /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | 9e69ff914d8ea054c1dbfd40cd63281c5b087163 (diff) | |
download | external_llvm-7bbf0ee97c77f7712154648a44ac6eeb57886462.zip external_llvm-7bbf0ee97c77f7712154648a44ac6eeb57886462.tar.gz external_llvm-7bbf0ee97c77f7712154648a44ac6eeb57886462.tar.bz2 |
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 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 9671a45..16a6107 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -1128,12 +1128,8 @@ void SelectionDAGBuilder::visitRet(const ReturnInst &I) { else if (F->paramHasAttr(0, Attribute::ZExt)) ExtendKind = ISD::ZERO_EXTEND; - if (ExtendKind != ISD::ANY_EXTEND && VT.isInteger()) { - MVT ReturnMVT = TLI.getTypeForExtArgOrReturn(VT, ExtendKind); - EVT MinVT = TLI.getRegisterType(*DAG.getContext(), ReturnMVT); - if (VT.bitsLT(MinVT)) - VT = MinVT; - } + if (ExtendKind != ISD::ANY_EXTEND && VT.isInteger()) + VT = TLI.getTypeForExtArgOrReturn(*DAG.getContext(), VT, ExtendKind); unsigned NumParts = TLI.getNumRegisters(*DAG.getContext(), VT); EVT PartVT = TLI.getRegisterType(*DAG.getContext(), VT); |