From 37f93d4cbfc1e47ce2af4d98a7a23d5089146f06 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 24 Apr 2015 00:01:37 +0000 Subject: [PATCH] RegisterCoalescer: implicit phsreg uses are fine when rematerializing The target hooks should have already checked them. This change is necessary to enable the remateriailzation on R600. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235673 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegisterCoalescer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index a8fcd950268..ee0877e2f23 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -963,8 +963,8 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP, for (unsigned i = NewMI->getDesc().getNumOperands(), e = NewMI->getNumOperands(); i != e; ++i) { MachineOperand &MO = NewMI->getOperand(i); - if (MO.isReg()) { - assert(MO.isDef() && MO.isImplicit() && MO.isDead() && + if (MO.isReg() && MO.isDef()) { + assert(MO.isImplicit() && MO.isDead() && TargetRegisterInfo::isPhysicalRegister(MO.getReg())); NewMIImplDefs.push_back(MO.getReg()); }