[llvm-commits] [llvm] r107957 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Jul 8 22:56:22 PDT 2010
Author: stoklund
Date: Fri Jul 9 00:56:21 2010
New Revision: 107957
URL: http://llvm.org/viewvc/llvm-project?rev=107957&view=rev
Log:
Avoid creating %physreg:subidx operands in SimpleRegisterCoalescing::RemoveCopyByCommutingDef.
This fixes PR7602.
Modified:
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=107957&r1=107956&r2=107957&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Fri Jul 9 00:56:21 2010
@@ -460,7 +460,10 @@
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()) {
More information about the llvm-commits
mailing list