[fast-isel] Fallback to SelectionDAG isel if we require strict alignment for
[oota-llvm.git] / lib / Target / ARM / ARMConstantIslandPass.cpp
index a9539850247f90c49ef94453335b9f4ee6579a68..dd05f0cf409a8fba0d3f9d691518406434a962fb 100644 (file)
@@ -1388,10 +1388,9 @@ bool ARMConstantIslands::handleConstantPoolUser(unsigned CPUserIndex) {
     // If the original WaterList entry was "new water" on this iteration,
     // propagate that to the new island.  This is just keeping NewWaterList
     // updated to match the WaterList, which will be updated below.
-    if (NewWaterList.count(WaterBB)) {
-      NewWaterList.erase(WaterBB);
+    if (NewWaterList.erase(WaterBB))
       NewWaterList.insert(NewIsland);
-    }
+
     // The new CPE goes before the following block (NewMBB).
     NewMBB = llvm::next(MachineFunction::iterator(WaterBB));