diff options
author | Eric Christopher <echristo@apple.com> | 2010-10-20 08:02:24 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-10-20 08:02:24 +0000 |
commit | af719ef86bc647fdbe391fa9ed0b2f7a792c77ce (patch) | |
tree | f2be93e483564ea476864a0725c8c10d8be72027 /llvm/lib/Target/ARM/ARMFastISel.cpp | |
parent | 4baa6ef5ecfd154e205766daeee58b18892fedc6 (diff) | |
download | bcm5719-llvm-af719ef86bc647fdbe391fa9ed0b2f7a792c77ce.tar.gz bcm5719-llvm-af719ef86bc647fdbe391fa9ed0b2f7a792c77ce.zip |
Fix a TODO by removing some unnecesary copies.
llvm-svn: 116915
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMFastISel.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp index 3a90d7aee40..e500458cf18 100644 --- a/llvm/lib/Target/ARM/ARMFastISel.cpp +++ b/llvm/lib/Target/ARM/ARMFastISel.cpp @@ -1384,25 +1384,17 @@ bool ARMFastISel::FinishCall(EVT RetVT, SmallVectorImpl<unsigned> &UsedRegs, if (RVLocs.size() == 2 && RetVT.getSimpleVT().SimpleTy == MVT::f64) { // For this move we copy into two registers and then move into the // double fp reg we want. - // TODO: Are the copies necessary? - TargetRegisterClass *CopyRC = TLI.getRegClassFor(MVT::i32); - unsigned Copy1 = createResultReg(CopyRC); - BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(TargetOpcode::COPY), - Copy1).addReg(RVLocs[0].getLocReg()); - UsedRegs.push_back(RVLocs[0].getLocReg()); - - unsigned Copy2 = createResultReg(CopyRC); - BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(TargetOpcode::COPY), - Copy2).addReg(RVLocs[1].getLocReg()); - UsedRegs.push_back(RVLocs[1].getLocReg()); - EVT DestVT = RVLocs[0].getValVT(); TargetRegisterClass* DstRC = TLI.getRegClassFor(DestVT); unsigned ResultReg = createResultReg(DstRC); AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(ARM::VMOVDRR), ResultReg) - .addReg(Copy1).addReg(Copy2)); + .addReg(RVLocs[0].getLocReg()) + .addReg(RVLocs[1].getLocReg())); + UsedRegs.push_back(RVLocs[0].getLocReg()); + UsedRegs.push_back(RVLocs[1].getLocReg()); + // Finally update the result. UpdateValueMap(I, ResultReg); } else { |