regpressure: physreg livein/out fix
authorAndrew Trick <atrick@apple.com>
Thu, 24 May 2012 22:10:57 +0000 (22:10 +0000)
committerAndrew Trick <atrick@apple.com>
Thu, 24 May 2012 22:10:57 +0000 (22:10 +0000)
llvm-svn: 157422

llvm/lib/CodeGen/RegisterPressure.cpp

index b30f76d..0bdb19a 100644 (file)
@@ -356,7 +356,7 @@ void RegPressureTracker::addLiveRegs(ArrayRef<unsigned> Regs) {
 /// Add PhysReg to the live in set and increase max pressure.
 void RegPressureTracker::discoverPhysLiveIn(unsigned Reg) {
   assert(!LivePhysRegs.count(Reg) && "avoid bumping max pressure twice");
-  if (findRegAlias(Reg, P.LiveInRegs, TRI) == P.LiveInRegs.end())
+  if (findRegAlias(Reg, P.LiveInRegs, TRI) != P.LiveInRegs.end())
     return;
 
   // At live in discovery, unconditionally increase the high water mark.
@@ -367,7 +367,7 @@ void RegPressureTracker::discoverPhysLiveIn(unsigned Reg) {
 /// Add PhysReg to the live out set and increase max pressure.
 void RegPressureTracker::discoverPhysLiveOut(unsigned Reg) {
   assert(!LivePhysRegs.count(Reg) && "avoid bumping max pressure twice");
-  if (findRegAlias(Reg, P.LiveOutRegs, TRI) == P.LiveOutRegs.end())
+  if (findRegAlias(Reg, P.LiveOutRegs, TRI) != P.LiveOutRegs.end())
     return;
 
   // At live out discovery, unconditionally increase the high water mark.