diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-03 00:04:37 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-03 00:04:37 +0000 |
| commit | 273f7e42994a5bce0614d04d96dbfdf05fd652e5 (patch) | |
| tree | 5963df402c4f6ba2641e0e869ddafa71fd5aa850 /lib/CodeGen/RegisterCoalescer.cpp | |
| parent | 43b8fd728b889f15ea4c65ca957a7420ce2905cd (diff) | |
Detect and handle COPY in many places.
This code is transitional, it will soon be possible to eliminate
isExtractSubreg, isInsertSubreg, and isMoveInstr in most places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegisterCoalescer.cpp')
| -rw-r--r-- | lib/CodeGen/RegisterCoalescer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index b943a271b6..8ff08836f6 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -44,7 +44,12 @@ unsigned CoalescerPair::compose(unsigned a, unsigned b) const { bool CoalescerPair::isMoveInstr(const MachineInstr *MI, unsigned &Src, unsigned &Dst, unsigned &SrcSub, unsigned &DstSub) const { - if (MI->isExtractSubreg()) { + if (MI->isCopy()) { + Dst = MI->getOperand(0).getReg(); + DstSub = MI->getOperand(0).getSubReg(); + Src = MI->getOperand(1).getReg(); + SrcSub = MI->getOperand(1).getSubReg(); + } else if (MI->isExtractSubreg()) { Dst = MI->getOperand(0).getReg(); DstSub = MI->getOperand(0).getSubReg(); Src = MI->getOperand(1).getReg(); |
