diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-09 05:56:21 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-09 05:56:21 +0000 |
| commit | da4e8fd8045405042f32227ec15ae69df906ef16 (patch) | |
| tree | 56f1caf583b622fc87fb9a03333ebcff97471dfa /lib/CodeGen/SimpleRegisterCoalescing.cpp | |
| parent | 94b9ac922bd49eaa77501cb093204dedc158ff26 (diff) | |
| download | external_llvm-da4e8fd8045405042f32227ec15ae69df906ef16.zip external_llvm-da4e8fd8045405042f32227ec15ae69df906ef16.tar.gz external_llvm-da4e8fd8045405042f32227ec15ae69df906ef16.tar.bz2 | |
Avoid creating %physreg:subidx operands in SimpleRegisterCoalescing::RemoveCopyByCommutingDef.
This fixes PR7602.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
| -rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 87337c9..b547c1d 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -460,7 +460,10 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(const CoalescerPair &CP, LiveInterval::iterator ULR = IntA.FindLiveRangeContaining(UseIdx); if (ULR == IntA.end() || ULR->valno != AValNo) continue; - UseMO.setReg(NewReg); + if (TargetRegisterInfo::isPhysicalRegister(NewReg)) + UseMO.substPhysReg(NewReg, *tri_); + else + UseMO.setReg(NewReg); if (UseMI == CopyMI) continue; if (UseMO.isKill()) { |
