diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-04-24 17:00:36 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-04-24 17:00:36 +0000 |
commit | 99194c9d87ec8d0cdba4b668969f9eda092accc8 (patch) | |
tree | b27cdbb83d47442d4a076c199e297298b4d40a3c | |
parent | 766d641c9830bb75ec4ab4f9c241e1d052caf566 (diff) | |
download | external_llvm-99194c9d87ec8d0cdba4b668969f9eda092accc8.zip external_llvm-99194c9d87ec8d0cdba4b668969f9eda092accc8.tar.gz external_llvm-99194c9d87ec8d0cdba4b668969f9eda092accc8.tar.bz2 |
Fix up some problems with getCopyToReg and getCopyFromReg nodes being
chained and "flagged" together. I also made a few changes to handle the
chain and flag values more consistently. I found these problems by
inspection so I'm not aware of anything that breaks because of them
(thus no testcase).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69977 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index e35b667..a3b7a7d 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -504,23 +504,26 @@ LowerCallResult(SDValue Chain, SDValue InFlag, CallSDNode *TheCall, if (VA.needsCustom()) { SDValue Lo = DAG.getCopyFromReg(Chain, dl, VA.getLocReg(), VA.getLocVT(), InFlag); + Chain = Lo.getValue(1); + InFlag = Lo.getValue(2); VA = RVLocs[++i]; // skip ahead to next loc - SDValue Hi = DAG.getCopyFromReg(Lo, dl, VA.getLocReg(), VA.getLocVT(), - Lo.getValue(2)); + SDValue Hi = DAG.getCopyFromReg(Chain, dl, VA.getLocReg(), VA.getLocVT(), + InFlag); + Chain = Hi.getValue(1); + InFlag = Hi.getValue(2); ResultVals.push_back(DAG.getNode(ARMISD::FMDRR, dl, VA.getValVT(), Lo, Hi)); } else { - Chain = DAG.getCopyFromReg(Chain, dl, VA.getLocReg(), VA.getLocVT(), - InFlag).getValue(1); - SDValue Val = Chain.getValue(0); - InFlag = Chain.getValue(2); + SDValue Val = DAG.getCopyFromReg(Chain, dl, VA.getLocReg(), VA.getLocVT(), + InFlag); + Chain = Val.getValue(1); + InFlag = Val.getValue(2); switch (VA.getLocInfo()) { default: assert(0 && "Unknown loc info!"); case CCValAssign::Full: break; case CCValAssign::BCvt: - Val = DAG.getNode(ISD::BIT_CONVERT, dl, VA.getValVT(), - Chain.getValue(0)); + Val = DAG.getNode(ISD::BIT_CONVERT, dl, VA.getValVT(), Val); break; } @@ -813,6 +816,7 @@ SDValue ARMTargetLowering::LowerRET(SDValue Op, SelectionDAG &DAG) { SDValue fmrrd = DAG.getNode(ARMISD::FMRRD, dl, DAG.getVTList(MVT::i32, MVT::i32), &Arg, 1); Chain = DAG.getCopyToReg(Chain, dl, VA.getLocReg(), fmrrd, Flag); + Flag = Chain.getValue(1); VA = RVLocs[++i]; // skip ahead to next loc Chain = DAG.getCopyToReg(Chain, dl, VA.getLocReg(), fmrrd.getValue(1), Flag); |