diff options
author | Dan Gohman <gohman@apple.com> | 2009-04-20 22:54:34 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-04-20 22:54:34 +0000 |
commit | 70bc17dbf5a991ce8f8f5285f61c352fb55b533d (patch) | |
tree | 75cda88840f2a79cbfd6f14dcb806da7ec11900b /lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp | |
parent | bd209ab9bc0f6ad667c15df4453955c2ed4c2434 (diff) |
Make X86's copyRegToReg able to handle copies to and from subclasses.
This makes the extra copyRegToReg calls in ScheduleDAGSDNodesEmit.cpp
unnecessary. Derived from a patch by Jakob Stoklund Olesen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp index 42fe1f5fbf..eddf44f1fb 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp @@ -131,12 +131,6 @@ void ScheduleDAGSDNodes::EmitCopyFromReg(SDNode *Node, unsigned ResNo, VRBase = MRI.createVirtualRegister(DstRC); bool Emitted = TII->copyRegToReg(*BB, InsertPos, VRBase, SrcReg, DstRC, SrcRC); - // If the target didn't handle the copy with different register - // classes and the destination is a subset of the source, - // try a normal same-RC copy. - if (!Emitted && DstRC->hasSuperClass(SrcRC)) - Emitted = TII->copyRegToReg(*BB, InsertPos, VRBase, SrcReg, - SrcRC, SrcRC); assert(Emitted && "Unable to issue a copy instruction!\n"); } @@ -273,12 +267,6 @@ ScheduleDAGSDNodes::AddRegisterOperand(MachineInstr *MI, SDValue Op, unsigned NewVReg = MRI.createVirtualRegister(DstRC); bool Emitted = TII->copyRegToReg(*BB, InsertPos, NewVReg, VReg, DstRC, SrcRC); - // If the target didn't handle the copy with different register - // classes and the destination is a subset of the source, - // try a normal same-RC copy. - if (!Emitted && DstRC->hasSuperClass(SrcRC)) - Emitted = TII->copyRegToReg(*BB, InsertPos, NewVReg, VReg, - SrcRC, SrcRC); assert(Emitted && "Unable to issue a copy instruction!\n"); VReg = NewVReg; } @@ -480,12 +468,6 @@ ScheduleDAGSDNodes::EmitCopyToRegClassNode(SDNode *Node, unsigned NewVReg = MRI.createVirtualRegister(DstRC); bool Emitted = TII->copyRegToReg(*BB, InsertPos, NewVReg, VReg, DstRC, SrcRC); - // If the target didn't handle the copy with different register - // classes and the destination is a subset of the source, - // try a normal same-RC copy. - if (!Emitted && SrcRC->hasSubClass(DstRC)) - Emitted = TII->copyRegToReg(*BB, InsertPos, NewVReg, VReg, - SrcRC, SrcRC); assert(Emitted && "Unable to issue a copy instruction for a COPY_TO_REGCLASS node!\n"); @@ -610,13 +592,6 @@ void ScheduleDAGSDNodes::EmitNode(SDNode *Node, bool IsClone, bool IsCloned, bool Emitted = TII->copyRegToReg(*BB, InsertPos, DestReg, SrcReg, DstTRC, SrcTRC); - // If the target didn't handle the copy with different register - // classes and the destination is a subset of the source, - // try a normal same-RC copy. - if (!Emitted && DstTRC->hasSubClass(SrcTRC)) - Emitted = TII->copyRegToReg(*BB, InsertPos, DestReg, SrcReg, - DstTRC, DstTRC); - assert(Emitted && "Unable to issue a copy instruction!\n"); break; } |