aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/TwoAddressInstructionPass.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-03 00:04:37 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-03 00:04:37 +0000
commit273f7e42994a5bce0614d04d96dbfdf05fd652e5 (patch)
tree5963df402c4f6ba2641e0e869ddafa71fd5aa850 /lib/CodeGen/TwoAddressInstructionPass.cpp
parent43b8fd728b889f15ea4c65ca957a7420ce2905cd (diff)
downloadexternal_llvm-273f7e42994a5bce0614d04d96dbfdf05fd652e5.zip
external_llvm-273f7e42994a5bce0614d04d96dbfdf05fd652e5.tar.gz
external_llvm-273f7e42994a5bce0614d04d96dbfdf05fd652e5.tar.bz2
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/TwoAddressInstructionPass.cpp')
-rw-r--r--lib/CodeGen/TwoAddressInstructionPass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp
index 62fa0fd..4d4318d 100644
--- a/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -382,7 +382,7 @@ static bool isCopyToReg(MachineInstr &MI, const TargetInstrInfo *TII,
DstReg = 0;
unsigned SrcSubIdx, DstSubIdx;
if (!TII->isMoveInstr(MI, SrcReg, DstReg, SrcSubIdx, DstSubIdx)) {
- if (MI.isExtractSubreg()) {
+ if (MI.isCopy() || MI.isExtractSubreg()) {
DstReg = MI.getOperand(0).getReg();
SrcReg = MI.getOperand(1).getReg();
} else if (MI.isInsertSubreg()) {