[llvm] [Analysis][NFC] Clean-up in ScalarEvolution when copying predicates (PR #108851)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 11:54:06 PDT 2024


================
@@ -8594,8 +8594,7 @@ const SCEV *ScalarEvolution::BackedgeTakenInfo::getExact(
     Ops.push_back(BECount);
 
     if (Preds)
-      for (const auto *P : ENT.Predicates)
-        Preds->push_back(P);
+      Preds->append(ENT.Predicates.begin(), ENT.Predicates.end());
----------------
nikic wrote:

```suggestion
      append_range(Preds, ENT.Predicates);
```
Does this work?

https://github.com/llvm/llvm-project/pull/108851


More information about the llvm-commits mailing list