mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
Restore previous behavior of defaulting to ZEXT. This works around two
things: (1) preventing PR1071 and (2) working around missing parameter attributes for bool type. (2) will be fixed shortly. When PR1071 is fixed, this patch should be undone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32831 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8c57dfb1ae
commit
376dd212f9
@ -766,17 +766,12 @@ void SelectionDAGLowering::visitRet(ReturnInst &I) {
|
||||
else
|
||||
TmpVT = MVT::i32;
|
||||
const FunctionType *FTy = I.getParent()->getParent()->getFunctionType();
|
||||
ISD::NodeType ExtendKind = ISD::ANY_EXTEND;
|
||||
ISD::NodeType ExtendKind = ISD::ZERO_EXTEND; // FIXME: ANY_EXTEND?
|
||||
if (FTy->paramHasAttr(0, FunctionType::SExtAttribute))
|
||||
ExtendKind = ISD::SIGN_EXTEND;
|
||||
if (FTy->paramHasAttr(0, FunctionType::ZExtAttribute))
|
||||
ExtendKind = ISD::ZERO_EXTEND;
|
||||
if (ExtendKind == ISD::ANY_EXTEND)
|
||||
// There was no specification for extension in the parameter attributes
|
||||
// so we will just let the legalizer do the ANY_EXTEND
|
||||
;
|
||||
else
|
||||
RetOp = DAG.getNode(ExtendKind, TmpVT, RetOp);
|
||||
RetOp = DAG.getNode(ExtendKind, TmpVT, RetOp);
|
||||
}
|
||||
NewValues.push_back(RetOp);
|
||||
NewValues.push_back(DAG.getConstant(false, MVT::i32));
|
||||
|
Loading…
Reference in New Issue
Block a user