[PATCH] D53876: Preserve loop metadata when splitting exit blocks

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 17:25:46 PST 2018


efriedma added inline comments.


================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:72
+    // Remove duplicate pred blocks (ex: switch pred with duplicate edges)
+    std::sort(InLoopPredecessors.begin(), InLoopPredecessors.end());
+    auto LastPred =
----------------
You're calling std::sort on a list of pointers; the result is non-deterministic, which could affect the compiler output.


Repository:
  rL LLVM

https://reviews.llvm.org/D53876





More information about the llvm-commits mailing list