Fix an anti-dep breaker corner case.
authorAndrew Trick <atrick@apple.com>
Sat, 5 Feb 2011 02:58:46 +0000 (02:58 +0000)
committerAndrew Trick <atrick@apple.com>
Sat, 5 Feb 2011 02:58:46 +0000 (02:58 +0000)
<rdar://problem/8959122> illegal register operands for UMULL instruction in cfrac nightly test
I'm stil working on a unit test, but the case is:
rx = movcc rx, r3
r2 = ldr
r2, r3 = umull r2, r2

The anti-dep breaker should not convert this into an illegal instruction:
r2, r2 = umull

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124932 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CriticalAntiDepBreaker.cpp

index 4817346061f53b54b001b53c9939a549fe52d988..7b2ce3624170d24e99698a04033c3d1935a036b4 100644 (file)
@@ -334,7 +334,6 @@ CriticalAntiDepBreaker::isNewRegModifiedByRefs(RegRefIter RegRefBegin,
 {
   for (RegRefIter I = RegRefBegin; I != RegRefEnd; ++I ) {
     MachineOperand *MO = I->second;
-    if (MO->isDef()) continue;
     if (MO->getParent()->modifiesRegister(NewReg, TRI))
       return true;
   }