From ab9baf7ff4b58b3905bccad68c8d2ab59ea4202b Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sat, 15 Sep 2012 16:32:11 +0000 Subject: [PATCH] Don't depend on kill flags in removeCopyByCommutingDef(). Kill flags are removed more and more aggressively during the register allocation passes, it is better to get information from LiveIntervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163972 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegisterCoalescer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index d0188354563..f8165d3fe08 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -583,7 +583,7 @@ bool RegisterCoalescer::removeCopyByCommutingDef(const CoalescerPair &CP, MachineOperand &NewDstMO = DefMI->getOperand(NewDstIdx); unsigned NewReg = NewDstMO.getReg(); - if (NewReg != IntB.reg || !NewDstMO.isKill()) + if (NewReg != IntB.reg || !LiveRangeQuery(IntB, AValNo->def).isKill()) return false; // Make sure there are no other definitions of IntB that would reach the