diff options
| author | Andrew Trick <atrick@apple.com> | 2013-06-21 18:33:11 +0000 |
|---|---|---|
| committer | Andrew Trick <atrick@apple.com> | 2013-06-21 18:33:11 +0000 |
| commit | 714aec021d599a49c5126622dabd385f8f68111d (patch) | |
| tree | 2f8e9952614c928151baa78535acf95e8a62458b /llvm/lib/CodeGen | |
| parent | 75961ecc1a5b0dff6303df886ea9817248b78931 (diff) | |
| download | bcm5719-llvm-714aec021d599a49c5126622dabd385f8f68111d.tar.gz bcm5719-llvm-714aec021d599a49c5126622dabd385f8f68111d.zip | |
Fix a -join-globalcopies bug; handle undef operands.
llvm-svn: 184569
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 6e7d90dd65c..70a2462880e 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -2072,6 +2072,9 @@ static bool isLocalCopy(MachineInstr *Copy, const LiveIntervals *LIS) { if (!Copy->isCopy()) return false; + if (Copy->getOperand(1).isUndef()) + return false; + unsigned SrcReg = Copy->getOperand(1).getReg(); unsigned DstReg = Copy->getOperand(0).getReg(); if (TargetRegisterInfo::isPhysicalRegister(SrcReg) |

