Fix for machine licm assert: RCCost <= RegPressure[RCId]
in MultiSource/Benchmarks/VersaBench/beamformer/beamformer.
SmallSet.insert returns true if the element is inserted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116790 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp
index 829fae6..ae3d9db 100644
--- a/lib/CodeGen/MachineLICM.cpp
+++ b/lib/CodeGen/MachineLICM.cpp
@@ -604,7 +604,7 @@
if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg))
continue;
- bool isNew = !RegSeen.insert(Reg);
+ bool isNew = RegSeen.insert(Reg);
const TargetRegisterClass *RC = MRI->getRegClass(Reg);
EVT VT = *RC->vt_begin();
unsigned RCId = TLI->getRepRegClassFor(VT)->getID();
@@ -634,7 +634,7 @@
if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg))
continue;
- bool isNew = !RegSeen.insert(Reg);
+ bool isNew = RegSeen.insert(Reg);
if (NoImpact)
continue;