use convenience function for copying IR flags; NFCI
[oota-llvm.git] / lib / Transforms / Scalar / SpeculativeExecution.cpp
index ff3f00a2e2f85daba2f20d2b2cc5f5630ddb8bfc..147d615488ffe17f3ee1075d71690ac73af029a6 100644 (file)
@@ -227,7 +227,7 @@ bool SpeculativeExecution::considerHoistingFromTo(BasicBlock &FromBlock,
     // changes the list that I is iterating through.
     auto Current = I;
     ++I;
-    if (!NotHoisted.count(Current)) {
+    if (!NotHoisted.count(&*Current)) {
       Current->moveBefore(ToBlock.getTerminator());
     }
   }