summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-03-17 14:53:37 +0000
committerCameron Zwarich <zwarich@apple.com>2011-03-17 14:53:37 +0000
commit2ef0c69df1eb57b22d9555e999ab586d5944c777 (patch)
treee471d12f8a156de370819cff9211413170145c05 /llvm/include
parent341c36dc8b9a43df1bc329dbe2fcb85e3e346b9e (diff)
downloadbcm5719-llvm-2ef0c69df1eb57b22d9555e999ab586d5944c777.tar.gz
bcm5719-llvm-2ef0c69df1eb57b22d9555e999ab586d5944c777.zip
Move more logic into getTypeForExtArgOrReturn.
llvm-svn: 127809
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Target/TargetLowering.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/include/llvm/Target/TargetLowering.h b/llvm/include/llvm/Target/TargetLowering.h
index bf1188ffdf5..5b3f2b35bf8 100644
--- a/llvm/include/llvm/Target/TargetLowering.h
+++ b/llvm/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
OpenPOWER on IntegriCloud