[clang] [clang-tools-extra] [compiler-rt] [llvm] [X86] AMD Zen 6 Initial enablement (PR #179150)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 2 02:45:50 PST 2026


================
@@ -551,8 +551,9 @@ void PopulateLoopsDFS<BlockT, LoopT>::insertIntoLoop(BlockT *Block) {
     // For convenience, Blocks and Subloops are inserted in postorder. Reverse
     // the lists, except for the loop header, which is always at the beginning.
     Subloop->reverseBlock(1);
-    std::reverse(Subloop->getSubLoopsVector().begin(),
-                 Subloop->getSubLoopsVector().end());
+    auto &SubloopsVec = Subloop->getSubLoopsVector();
+    if (!SubloopsVec.empty())
+      std::reverse(SubloopsVec.begin(), SubloopsVec.end());
----------------
RKSimon wrote:

where did this come from?

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


More information about the cfe-commits mailing list