Skip to content

[Support] Assert that DomTree nodes share parent #101198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 10, 2024

Conversation

aengelke
Copy link
Contributor

@aengelke aengelke commented Jul 30, 2024

A dominance query of a block that is in a different function is
ill-defined, so assert that getNode() is only called for blocks that are
in the same function.

There are two cases, where this behavior did occur. LoopFuse didn't
explicitly do this, but didn't invalidate the SCEV block dispositions,
leaving dangling pointers to free'ed basic blocks behind, causing
use-after-free. We do, however, want to be able to dereference basic
blocks inside the dominator tree, so that we can refer to them by a
number stored inside the basic block.


~~Depends on #101195, included here as first commit (only look at the second commit, will rebase once #101195 is merged).~~Rebased.

@llvmbot
Copy link
Member

llvmbot commented Jul 30, 2024

@llvm/pr-subscribers-llvm-analysis
@llvm/pr-subscribers-llvm-ir

@llvm/pr-subscribers-backend-aarch64

Author: Alexis Engelke (aengelke)

Changes

A dominance query of a block that is in a different function is
ill-defined, so assert that getNode() is only called for blocks that are
in the same function.

There are two cases, where this behavior did occur. LoopFuse didn't
explicitly do this, but didn't invalidate the SCEV block dispositions,
leaving dangling pointers to free'ed basic blocks behind, causing
use-after-free. We do, however, want to be able to dereference basic
blocks inside the dominator tree, so that we can refer to them by a
number stored inside the basic block.


Depends on #101195, included here as first commit (only look at the second commit, will rebase once #101195 is merged).


Full diff: https://github.com/llvm/llvm-project/pull/101198.diff

9 Files Affected:

  • (modified) llvm/include/llvm/Analysis/GenericDomTreeUpdater.h (+1-1)
  • (modified) llvm/include/llvm/Support/GenericDomTree.h (+2)
  • (modified) llvm/lib/Analysis/DomTreeUpdater.cpp (+3-5)
  • (modified) llvm/lib/Analysis/TypeMetadataUtils.cpp (+2)
  • (modified) llvm/lib/Analysis/ValueTracking.cpp (+4)
  • (modified) llvm/lib/CodeGen/EarlyIfConversion.cpp (+27-19)
  • (modified) llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp (+2-1)
  • (modified) llvm/lib/Transforms/Scalar/LoopFuse.cpp (+6-2)
  • (modified) llvm/unittests/IR/DominatorTreeTest.cpp (+1-2)
diff --git a/llvm/include/llvm/Analysis/GenericDomTreeUpdater.h b/llvm/include/llvm/Analysis/GenericDomTreeUpdater.h
index 84ed882c6de84..ca4ce68b85cbc 100644
--- a/llvm/include/llvm/Analysis/GenericDomTreeUpdater.h
+++ b/llvm/include/llvm/Analysis/GenericDomTreeUpdater.h
@@ -232,7 +232,7 @@ class GenericDomTreeUpdater {
   /// insertEdge/deleteEdge or is unnecessary in the batch update.
   bool isUpdateValid(typename DomTreeT::UpdateType Update) const;
 
-  /// Erase Basic Block node that has been unlinked from Function
+  /// Erase Basic Block node before it is unlinked from Function
   /// in the DomTree and PostDomTree.
   void eraseDelBBNode(BasicBlockT *DelBB);
 
diff --git a/llvm/include/llvm/Support/GenericDomTree.h b/llvm/include/llvm/Support/GenericDomTree.h
index e05e5f0f842e3..00bf607fbc8b1 100644
--- a/llvm/include/llvm/Support/GenericDomTree.h
+++ b/llvm/include/llvm/Support/GenericDomTree.h
@@ -359,6 +359,8 @@ class DominatorTreeBase {
   /// may (but is not required to) be null for a forward (backwards)
   /// statically unreachable block.
   DomTreeNodeBase<NodeT> *getNode(const NodeT *BB) const {
+    assert((!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) &&
+           "cannot get DomTreeNode of block with different parent");
     auto I = DomTreeNodes.find(BB);
     if (I != DomTreeNodes.end())
       return I->second.get();
diff --git a/llvm/lib/Analysis/DomTreeUpdater.cpp b/llvm/lib/Analysis/DomTreeUpdater.cpp
index 6895317c1d03a..351bd66e389bc 100644
--- a/llvm/lib/Analysis/DomTreeUpdater.cpp
+++ b/llvm/lib/Analysis/DomTreeUpdater.cpp
@@ -42,9 +42,8 @@ bool DomTreeUpdater::forceFlushDeletedBB() {
     // delete only has an UnreachableInst inside.
     assert(BB->size() == 1 && isa<UnreachableInst>(BB->getTerminator()) &&
            "DelBB has been modified while awaiting deletion.");
-    BB->removeFromParent();
     eraseDelBBNode(BB);
-    delete BB;
+    BB->eraseFromParent();
   }
   DeletedBBs.clear();
   Callbacks.clear();
@@ -63,9 +62,8 @@ void DomTreeUpdater::deleteBB(BasicBlock *DelBB) {
     return;
   }
 
-  DelBB->removeFromParent();
   eraseDelBBNode(DelBB);
-  delete DelBB;
+  DelBB->eraseFromParent();
 }
 
 void DomTreeUpdater::callbackDeleteBB(
@@ -77,8 +75,8 @@ void DomTreeUpdater::callbackDeleteBB(
     return;
   }
 
-  DelBB->removeFromParent();
   eraseDelBBNode(DelBB);
+  DelBB->removeFromParent();
   Callback(DelBB);
   delete DelBB;
 }
diff --git a/llvm/lib/Analysis/TypeMetadataUtils.cpp b/llvm/lib/Analysis/TypeMetadataUtils.cpp
index 67ce1540112bb..9ec0785eb5034 100644
--- a/llvm/lib/Analysis/TypeMetadataUtils.cpp
+++ b/llvm/lib/Analysis/TypeMetadataUtils.cpp
@@ -33,6 +33,8 @@ findCallsAtConstantOffset(SmallVectorImpl<DevirtCallSite> &DevirtCalls,
     // after indirect call promotion and inlining, where we may have uses
     // of the vtable pointer guarded by a function pointer check, and a fallback
     // indirect call.
+    if (CI->getFunction() != User->getFunction())
+      continue;
     if (!DT.dominates(CI, User))
       continue;
     if (isa<BitCastInst>(User)) {
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 285284dc27071..f813cba0167e6 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -526,6 +526,10 @@ bool llvm::isValidAssumeForContext(const Instruction *Inv,
     return AllowEphemerals || !isEphemeralValueOf(Inv, CxtI);
   }
 
+  // Inv and CxtI are in different functions.
+  if (Inv->getFunction() != CxtI->getFunction())
+    return false;
+
   // Inv and CxtI are in different blocks.
   if (DT) {
     if (DT->dominates(Inv, CxtI))
diff --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp
index d506c625d8ca5..0de8112fb72c8 100644
--- a/llvm/lib/CodeGen/EarlyIfConversion.cpp
+++ b/llvm/lib/CodeGen/EarlyIfConversion.cpp
@@ -181,8 +181,8 @@ class SSAIfConv {
   bool canConvertIf(MachineBasicBlock *MBB, bool Predicate = false);
 
   /// convertIf - If-convert the last block passed to canConvertIf(), assuming
-  /// it is possible. Add any erased blocks to RemovedBlocks.
-  void convertIf(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks,
+  /// it is possible. Add any blocks that are to be erased to RemoveBlocks.
+  void convertIf(SmallVectorImpl<MachineBasicBlock *> &RemoveBlocks,
                  bool Predicate = false);
 };
 } // end anonymous namespace
@@ -678,9 +678,9 @@ void SSAIfConv::rewritePHIOperands() {
 /// convertIf - Execute the if conversion after canConvertIf has determined the
 /// feasibility.
 ///
-/// Any basic blocks erased will be added to RemovedBlocks.
+/// Any basic blocks that need to be erased will be added to RemoveBlocks.
 ///
-void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks,
+void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemoveBlocks,
                           bool Predicate) {
   assert(Head && Tail && TBB && FBB && "Call canConvertIf first.");
 
@@ -721,15 +721,18 @@ void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks,
   DebugLoc HeadDL = Head->getFirstTerminator()->getDebugLoc();
   TII->removeBranch(*Head);
 
-  // Erase the now empty conditional blocks. It is likely that Head can fall
+  // Mark the now empty conditional blocks for removal and move them to the end.
+  // It is likely that Head can fall
   // through to Tail, and we can join the two blocks.
   if (TBB != Tail) {
-    RemovedBlocks.push_back(TBB);
-    TBB->eraseFromParent();
+    RemoveBlocks.push_back(TBB);
+    if (TBB != &TBB->getParent()->back())
+      TBB->moveAfter(&TBB->getParent()->back());
   }
   if (FBB != Tail) {
-    RemovedBlocks.push_back(FBB);
-    FBB->eraseFromParent();
+    RemoveBlocks.push_back(FBB);
+    if (FBB != &FBB->getParent()->back())
+      FBB->moveAfter(&FBB->getParent()->back());
   }
 
   assert(Head->succ_empty() && "Additional head successors?");
@@ -740,8 +743,9 @@ void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks,
     Head->splice(Head->end(), Tail,
                      Tail->begin(), Tail->end());
     Head->transferSuccessorsAndUpdatePHIs(Tail);
-    RemovedBlocks.push_back(Tail);
-    Tail->eraseFromParent();
+    RemoveBlocks.push_back(Tail);
+    if (Tail != &Tail->getParent()->back())
+      Tail->moveAfter(&Tail->getParent()->back());
   } else {
     // We need a branch to Tail, let code placement work it out later.
     LLVM_DEBUG(dbgs() << "Converting to unconditional branch.\n");
@@ -1062,11 +1066,13 @@ bool EarlyIfConverter::tryConvertIf(MachineBasicBlock *MBB) {
   while (IfConv.canConvertIf(MBB) && shouldConvertIf()) {
     // If-convert MBB and update analyses.
     invalidateTraces();
-    SmallVector<MachineBasicBlock*, 4> RemovedBlocks;
-    IfConv.convertIf(RemovedBlocks);
+    SmallVector<MachineBasicBlock *, 4> RemoveBlocks;
+    IfConv.convertIf(RemoveBlocks);
     Changed = true;
-    updateDomTree(DomTree, IfConv, RemovedBlocks);
-    updateLoops(Loops, RemovedBlocks);
+    updateDomTree(DomTree, IfConv, RemoveBlocks);
+    for (MachineBasicBlock *MBB : RemoveBlocks)
+      MBB->eraseFromParent();
+    updateLoops(Loops, RemoveBlocks);
   }
   return Changed;
 }
@@ -1200,11 +1206,13 @@ bool EarlyIfPredicator::tryConvertIf(MachineBasicBlock *MBB) {
   bool Changed = false;
   while (IfConv.canConvertIf(MBB, /*Predicate*/ true) && shouldConvertIf()) {
     // If-convert MBB and update analyses.
-    SmallVector<MachineBasicBlock *, 4> RemovedBlocks;
-    IfConv.convertIf(RemovedBlocks, /*Predicate*/ true);
+    SmallVector<MachineBasicBlock *, 4> RemoveBlocks;
+    IfConv.convertIf(RemoveBlocks, /*Predicate*/ true);
     Changed = true;
-    updateDomTree(DomTree, IfConv, RemovedBlocks);
-    updateLoops(Loops, RemovedBlocks);
+    updateDomTree(DomTree, IfConv, RemoveBlocks);
+    for (MachineBasicBlock *MBB : RemoveBlocks)
+      MBB->eraseFromParent();
+    updateLoops(Loops, RemoveBlocks);
   }
   return Changed;
 }
diff --git a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
index 49e5211af50cc..9669a393bc2b9 100644
--- a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
@@ -711,7 +711,6 @@ void SSACCmpConv::convert(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks) {
   Head->updateTerminator(CmpBB->getNextNode());
 
   RemovedBlocks.push_back(CmpBB);
-  CmpBB->eraseFromParent();
   LLVM_DEBUG(dbgs() << "Result:\n" << *Head);
   ++NumConverted;
 }
@@ -918,6 +917,8 @@ bool AArch64ConditionalCompares::tryConvert(MachineBasicBlock *MBB) {
     CmpConv.convert(RemovedBlocks);
     Changed = true;
     updateDomTree(RemovedBlocks);
+    for (MachineBasicBlock *MBB : RemovedBlocks)
+      MBB->eraseFromParent();
     updateLoops(RemovedBlocks);
   }
   return Changed;
diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
index 8512b2accbe7c..fe0e30d1965e0 100644
--- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
@@ -1729,7 +1729,9 @@ struct LoopFuser {
     // mergeLatch may remove the only block in FC1.
     SE.forgetLoop(FC1.L);
     SE.forgetLoop(FC0.L);
-    SE.forgetLoopDispositions();
+    // Forget block dispositions as well, so that there are no dangling
+    // pointers to erased/free'ed blocks.
+    SE.forgetBlockAndLoopDispositions();
 
     // Move instructions from FC0.Latch to FC1.Latch.
     // Note: mergeLatch requires an updated DT.
@@ -2023,7 +2025,9 @@ struct LoopFuser {
     // mergeLatch may remove the only block in FC1.
     SE.forgetLoop(FC1.L);
     SE.forgetLoop(FC0.L);
-    SE.forgetLoopDispositions();
+    // Forget block dispositions as well, so that there are no dangling
+    // pointers to erased/free'ed blocks.
+    SE.forgetBlockAndLoopDispositions();
 
     // Move instructions from FC0.Latch to FC1.Latch.
     // Note: mergeLatch requires an updated DT.
diff --git a/llvm/unittests/IR/DominatorTreeTest.cpp b/llvm/unittests/IR/DominatorTreeTest.cpp
index 44bde74ad350f..555348c65a63d 100644
--- a/llvm/unittests/IR/DominatorTreeTest.cpp
+++ b/llvm/unittests/IR/DominatorTreeTest.cpp
@@ -607,11 +607,10 @@ TEST(DominatorTree, DeletingEdgesIntroducesInfiniteLoop2) {
         SwitchC->removeCase(SwitchC->case_begin());
         DT->deleteEdge(C, C2);
         PDT->deleteEdge(C, C2);
-        C2->removeFromParent();
 
         EXPECT_EQ(DT->getNode(C2), nullptr);
         PDT->eraseNode(C2);
-        delete C2;
+        C2->eraseFromParent();
 
         EXPECT_TRUE(DT->verify());
         EXPECT_TRUE(PDT->verify());

@llvmbot
Copy link
Member

llvmbot commented Jul 30, 2024

@llvm/pr-subscribers-llvm-transforms

Author: Alexis Engelke (aengelke)

Changes

A dominance query of a block that is in a different function is
ill-defined, so assert that getNode() is only called for blocks that are
in the same function.

There are two cases, where this behavior did occur. LoopFuse didn't
explicitly do this, but didn't invalidate the SCEV block dispositions,
leaving dangling pointers to free'ed basic blocks behind, causing
use-after-free. We do, however, want to be able to dereference basic
blocks inside the dominator tree, so that we can refer to them by a
number stored inside the basic block.


Depends on #101195, included here as first commit (only look at the second commit, will rebase once #101195 is merged).


Full diff: https://github.com/llvm/llvm-project/pull/101198.diff

9 Files Affected:

  • (modified) llvm/include/llvm/Analysis/GenericDomTreeUpdater.h (+1-1)
  • (modified) llvm/include/llvm/Support/GenericDomTree.h (+2)
  • (modified) llvm/lib/Analysis/DomTreeUpdater.cpp (+3-5)
  • (modified) llvm/lib/Analysis/TypeMetadataUtils.cpp (+2)
  • (modified) llvm/lib/Analysis/ValueTracking.cpp (+4)
  • (modified) llvm/lib/CodeGen/EarlyIfConversion.cpp (+27-19)
  • (modified) llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp (+2-1)
  • (modified) llvm/lib/Transforms/Scalar/LoopFuse.cpp (+6-2)
  • (modified) llvm/unittests/IR/DominatorTreeTest.cpp (+1-2)
diff --git a/llvm/include/llvm/Analysis/GenericDomTreeUpdater.h b/llvm/include/llvm/Analysis/GenericDomTreeUpdater.h
index 84ed882c6de84..ca4ce68b85cbc 100644
--- a/llvm/include/llvm/Analysis/GenericDomTreeUpdater.h
+++ b/llvm/include/llvm/Analysis/GenericDomTreeUpdater.h
@@ -232,7 +232,7 @@ class GenericDomTreeUpdater {
   /// insertEdge/deleteEdge or is unnecessary in the batch update.
   bool isUpdateValid(typename DomTreeT::UpdateType Update) const;
 
-  /// Erase Basic Block node that has been unlinked from Function
+  /// Erase Basic Block node before it is unlinked from Function
   /// in the DomTree and PostDomTree.
   void eraseDelBBNode(BasicBlockT *DelBB);
 
diff --git a/llvm/include/llvm/Support/GenericDomTree.h b/llvm/include/llvm/Support/GenericDomTree.h
index e05e5f0f842e3..00bf607fbc8b1 100644
--- a/llvm/include/llvm/Support/GenericDomTree.h
+++ b/llvm/include/llvm/Support/GenericDomTree.h
@@ -359,6 +359,8 @@ class DominatorTreeBase {
   /// may (but is not required to) be null for a forward (backwards)
   /// statically unreachable block.
   DomTreeNodeBase<NodeT> *getNode(const NodeT *BB) const {
+    assert((!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) &&
+           "cannot get DomTreeNode of block with different parent");
     auto I = DomTreeNodes.find(BB);
     if (I != DomTreeNodes.end())
       return I->second.get();
diff --git a/llvm/lib/Analysis/DomTreeUpdater.cpp b/llvm/lib/Analysis/DomTreeUpdater.cpp
index 6895317c1d03a..351bd66e389bc 100644
--- a/llvm/lib/Analysis/DomTreeUpdater.cpp
+++ b/llvm/lib/Analysis/DomTreeUpdater.cpp
@@ -42,9 +42,8 @@ bool DomTreeUpdater::forceFlushDeletedBB() {
     // delete only has an UnreachableInst inside.
     assert(BB->size() == 1 && isa<UnreachableInst>(BB->getTerminator()) &&
            "DelBB has been modified while awaiting deletion.");
-    BB->removeFromParent();
     eraseDelBBNode(BB);
-    delete BB;
+    BB->eraseFromParent();
   }
   DeletedBBs.clear();
   Callbacks.clear();
@@ -63,9 +62,8 @@ void DomTreeUpdater::deleteBB(BasicBlock *DelBB) {
     return;
   }
 
-  DelBB->removeFromParent();
   eraseDelBBNode(DelBB);
-  delete DelBB;
+  DelBB->eraseFromParent();
 }
 
 void DomTreeUpdater::callbackDeleteBB(
@@ -77,8 +75,8 @@ void DomTreeUpdater::callbackDeleteBB(
     return;
   }
 
-  DelBB->removeFromParent();
   eraseDelBBNode(DelBB);
+  DelBB->removeFromParent();
   Callback(DelBB);
   delete DelBB;
 }
diff --git a/llvm/lib/Analysis/TypeMetadataUtils.cpp b/llvm/lib/Analysis/TypeMetadataUtils.cpp
index 67ce1540112bb..9ec0785eb5034 100644
--- a/llvm/lib/Analysis/TypeMetadataUtils.cpp
+++ b/llvm/lib/Analysis/TypeMetadataUtils.cpp
@@ -33,6 +33,8 @@ findCallsAtConstantOffset(SmallVectorImpl<DevirtCallSite> &DevirtCalls,
     // after indirect call promotion and inlining, where we may have uses
     // of the vtable pointer guarded by a function pointer check, and a fallback
     // indirect call.
+    if (CI->getFunction() != User->getFunction())
+      continue;
     if (!DT.dominates(CI, User))
       continue;
     if (isa<BitCastInst>(User)) {
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 285284dc27071..f813cba0167e6 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -526,6 +526,10 @@ bool llvm::isValidAssumeForContext(const Instruction *Inv,
     return AllowEphemerals || !isEphemeralValueOf(Inv, CxtI);
   }
 
+  // Inv and CxtI are in different functions.
+  if (Inv->getFunction() != CxtI->getFunction())
+    return false;
+
   // Inv and CxtI are in different blocks.
   if (DT) {
     if (DT->dominates(Inv, CxtI))
diff --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp
index d506c625d8ca5..0de8112fb72c8 100644
--- a/llvm/lib/CodeGen/EarlyIfConversion.cpp
+++ b/llvm/lib/CodeGen/EarlyIfConversion.cpp
@@ -181,8 +181,8 @@ class SSAIfConv {
   bool canConvertIf(MachineBasicBlock *MBB, bool Predicate = false);
 
   /// convertIf - If-convert the last block passed to canConvertIf(), assuming
-  /// it is possible. Add any erased blocks to RemovedBlocks.
-  void convertIf(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks,
+  /// it is possible. Add any blocks that are to be erased to RemoveBlocks.
+  void convertIf(SmallVectorImpl<MachineBasicBlock *> &RemoveBlocks,
                  bool Predicate = false);
 };
 } // end anonymous namespace
@@ -678,9 +678,9 @@ void SSAIfConv::rewritePHIOperands() {
 /// convertIf - Execute the if conversion after canConvertIf has determined the
 /// feasibility.
 ///
-/// Any basic blocks erased will be added to RemovedBlocks.
+/// Any basic blocks that need to be erased will be added to RemoveBlocks.
 ///
-void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks,
+void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemoveBlocks,
                           bool Predicate) {
   assert(Head && Tail && TBB && FBB && "Call canConvertIf first.");
 
@@ -721,15 +721,18 @@ void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks,
   DebugLoc HeadDL = Head->getFirstTerminator()->getDebugLoc();
   TII->removeBranch(*Head);
 
-  // Erase the now empty conditional blocks. It is likely that Head can fall
+  // Mark the now empty conditional blocks for removal and move them to the end.
+  // It is likely that Head can fall
   // through to Tail, and we can join the two blocks.
   if (TBB != Tail) {
-    RemovedBlocks.push_back(TBB);
-    TBB->eraseFromParent();
+    RemoveBlocks.push_back(TBB);
+    if (TBB != &TBB->getParent()->back())
+      TBB->moveAfter(&TBB->getParent()->back());
   }
   if (FBB != Tail) {
-    RemovedBlocks.push_back(FBB);
-    FBB->eraseFromParent();
+    RemoveBlocks.push_back(FBB);
+    if (FBB != &FBB->getParent()->back())
+      FBB->moveAfter(&FBB->getParent()->back());
   }
 
   assert(Head->succ_empty() && "Additional head successors?");
@@ -740,8 +743,9 @@ void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks,
     Head->splice(Head->end(), Tail,
                      Tail->begin(), Tail->end());
     Head->transferSuccessorsAndUpdatePHIs(Tail);
-    RemovedBlocks.push_back(Tail);
-    Tail->eraseFromParent();
+    RemoveBlocks.push_back(Tail);
+    if (Tail != &Tail->getParent()->back())
+      Tail->moveAfter(&Tail->getParent()->back());
   } else {
     // We need a branch to Tail, let code placement work it out later.
     LLVM_DEBUG(dbgs() << "Converting to unconditional branch.\n");
@@ -1062,11 +1066,13 @@ bool EarlyIfConverter::tryConvertIf(MachineBasicBlock *MBB) {
   while (IfConv.canConvertIf(MBB) && shouldConvertIf()) {
     // If-convert MBB and update analyses.
     invalidateTraces();
-    SmallVector<MachineBasicBlock*, 4> RemovedBlocks;
-    IfConv.convertIf(RemovedBlocks);
+    SmallVector<MachineBasicBlock *, 4> RemoveBlocks;
+    IfConv.convertIf(RemoveBlocks);
     Changed = true;
-    updateDomTree(DomTree, IfConv, RemovedBlocks);
-    updateLoops(Loops, RemovedBlocks);
+    updateDomTree(DomTree, IfConv, RemoveBlocks);
+    for (MachineBasicBlock *MBB : RemoveBlocks)
+      MBB->eraseFromParent();
+    updateLoops(Loops, RemoveBlocks);
   }
   return Changed;
 }
@@ -1200,11 +1206,13 @@ bool EarlyIfPredicator::tryConvertIf(MachineBasicBlock *MBB) {
   bool Changed = false;
   while (IfConv.canConvertIf(MBB, /*Predicate*/ true) && shouldConvertIf()) {
     // If-convert MBB and update analyses.
-    SmallVector<MachineBasicBlock *, 4> RemovedBlocks;
-    IfConv.convertIf(RemovedBlocks, /*Predicate*/ true);
+    SmallVector<MachineBasicBlock *, 4> RemoveBlocks;
+    IfConv.convertIf(RemoveBlocks, /*Predicate*/ true);
     Changed = true;
-    updateDomTree(DomTree, IfConv, RemovedBlocks);
-    updateLoops(Loops, RemovedBlocks);
+    updateDomTree(DomTree, IfConv, RemoveBlocks);
+    for (MachineBasicBlock *MBB : RemoveBlocks)
+      MBB->eraseFromParent();
+    updateLoops(Loops, RemoveBlocks);
   }
   return Changed;
 }
diff --git a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
index 49e5211af50cc..9669a393bc2b9 100644
--- a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
@@ -711,7 +711,6 @@ void SSACCmpConv::convert(SmallVectorImpl<MachineBasicBlock *> &RemovedBlocks) {
   Head->updateTerminator(CmpBB->getNextNode());
 
   RemovedBlocks.push_back(CmpBB);
-  CmpBB->eraseFromParent();
   LLVM_DEBUG(dbgs() << "Result:\n" << *Head);
   ++NumConverted;
 }
@@ -918,6 +917,8 @@ bool AArch64ConditionalCompares::tryConvert(MachineBasicBlock *MBB) {
     CmpConv.convert(RemovedBlocks);
     Changed = true;
     updateDomTree(RemovedBlocks);
+    for (MachineBasicBlock *MBB : RemovedBlocks)
+      MBB->eraseFromParent();
     updateLoops(RemovedBlocks);
   }
   return Changed;
diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
index 8512b2accbe7c..fe0e30d1965e0 100644
--- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
@@ -1729,7 +1729,9 @@ struct LoopFuser {
     // mergeLatch may remove the only block in FC1.
     SE.forgetLoop(FC1.L);
     SE.forgetLoop(FC0.L);
-    SE.forgetLoopDispositions();
+    // Forget block dispositions as well, so that there are no dangling
+    // pointers to erased/free'ed blocks.
+    SE.forgetBlockAndLoopDispositions();
 
     // Move instructions from FC0.Latch to FC1.Latch.
     // Note: mergeLatch requires an updated DT.
@@ -2023,7 +2025,9 @@ struct LoopFuser {
     // mergeLatch may remove the only block in FC1.
     SE.forgetLoop(FC1.L);
     SE.forgetLoop(FC0.L);
-    SE.forgetLoopDispositions();
+    // Forget block dispositions as well, so that there are no dangling
+    // pointers to erased/free'ed blocks.
+    SE.forgetBlockAndLoopDispositions();
 
     // Move instructions from FC0.Latch to FC1.Latch.
     // Note: mergeLatch requires an updated DT.
diff --git a/llvm/unittests/IR/DominatorTreeTest.cpp b/llvm/unittests/IR/DominatorTreeTest.cpp
index 44bde74ad350f..555348c65a63d 100644
--- a/llvm/unittests/IR/DominatorTreeTest.cpp
+++ b/llvm/unittests/IR/DominatorTreeTest.cpp
@@ -607,11 +607,10 @@ TEST(DominatorTree, DeletingEdgesIntroducesInfiniteLoop2) {
         SwitchC->removeCase(SwitchC->case_begin());
         DT->deleteEdge(C, C2);
         PDT->deleteEdge(C, C2);
-        C2->removeFromParent();
 
         EXPECT_EQ(DT->getNode(C2), nullptr);
         PDT->eraseNode(C2);
-        delete C2;
+        C2->eraseFromParent();
 
         EXPECT_TRUE(DT->verify());
         EXPECT_TRUE(PDT->verify());

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of assertion failures in polly tests.

@aengelke
Copy link
Contributor Author

There are a lot of assertion failures in polly tests.

Yeah, Polly is somewhat broken... I tested Clang, Bolt, and MLIR but didn't think about Polly. There's this big comment above the workaround that explains the problems of fixing them. This was introduced in e3c0558 in 2014.

@tobiasgrosser Any advice on the easiest way to fix Polly to not use the dominator tree for blocks outside of its function? Is removing the dominator tree(/loop info?) from Polly's CodeGen feasible with reasonably low effort? Unfortunately I don't know enough about the Polly code to do the "proper" fix (if there is such a thing).

@tobiasgrosser
Copy link
Contributor

tobiasgrosser commented Jul 31, 2024

As a first approximation, we may look if the assertion failures in Polly's tests only cover OpenMP code? In that case, we could potentially just drop the OpenMP code generation? Or maybe @Meinersbur has an idea?

@Meinersbur
Copy link
Member

The OpenMP outlining is the only functionality that writes outside the current function. However, this is not the only violation of the pass manager constraints (legacy/NPM). The other is that it does not preserve analyses such as (Post-)DominatorTree, LoopInfo and RegionInfo after finishing the CodeGen pass, but claims that it would. The reason is that invalidating any of those analysis would also invalidate its own analysis ScopInfo, making processing any other SCoP in the function impossible.

Instead, I would suggest to make Polly a module-level pass and that pass call Polly's components itself. The "giant comment" claims that it is not possible, but that's not entirely true: Polly is free to create its own pass manager instance and requesting analyses from it. That is true with the legacy as well as the NPM and Polly does so already with the PollyCanonicalize pass.

However, all is not directly related with Polly's assertion failures due to this patch. The problem is that removeSubFuncFromDomTree is called AFTER the outlining, i.e. the DT nodes are already in the new function when we should ensure do so before the outlining such that DT never sees a BB that is not in the function that it was originally called on. Also, ParallelLoopGenerator::createSub must instantiate its own DominatorTree instead of reusing the existing one. I don't even think it needs one other than to satistfy interfaces that pass DT by reference.

I will prepare a patch.

@Meinersbur
Copy link
Member

The more difficult problem turns out to be ScalarEvolution. It has the same problem in that Polly uses it across function boundaries, but also uses DominatorTree of which we need two (one for the original function, one for the outlined function). We also cannot just not create a DominatorTree/LoopInfo for the outline function (since it would be recomputed for the next pass anyway) because SCEVExpander uses them during generation.

In contrast to DomTree and LoopInfo, the separation on whether the SCEV is on the original code or the new code emitted by SCEVExpander is not as clear. That is, Polly subclasses it as the ScopExpander class and should be able to map to the outlined function. Stay tuned.

@Meinersbur
Copy link
Member

Meinersbur commented Aug 8, 2024

#102460 should fix Polly's test failures.

Meinersbur added a commit that referenced this pull request Aug 10, 2024
DominatorTree, LoopInfo, and ScalarEvolution are function-level analyses
that expect to be called only on instructions and basic blocks of the
function they were original created for. When Polly outlined a parallel
loop body into a separate function, it reused the same analyses seemed
to work until new checks to be added in #101198.

This patch creates new analyses for the subfunctions. GenDT, GenLI, and
GenSE now refer to the analyses of the current region of code. Outside
of an outlined function, they refer to the same analysis as used for the
SCoP, but are substituted within an outlined function.

Additionally to the cross-function queries of DT/LI/SE, we must not
create SCEVs that refer to a mix of expressions for old and generated
values. Currently, SCEVs themselves do not "remember" which
ScalarEvolution analysis they were created for, but mixing them is just
as unexpected as using DT/LI across function boundaries. Hence
`SCEVLoopAddRecRewriter` was combined into `ScopExpander`.
`SCEVLoopAddRecRewriter` only replaced induction variables but left
SCEVUnknowns to reference the old function. `SCEVParameterRewriter`
would have done so but its job was effectively superseded by
`ScopExpander`, and now also `SCEVLoopAddRecRewriter`. Some issues
persist put marked with a FIXME in the code. Changing them would
possibly cause this patch to be not NFC anymore.
A dominance query of a block that is in a different function is
ill-defined, so assert that getNode() is only called for blocks that are
in the same function.

There are two cases, where this behavior did occur. LoopFuse didn't
explicitly do this, but didn't invalidate the SCEV block dispositions,
leaving dangling pointers to free'ed basic blocks behind, causing
use-after-free. We do, however, want to be able to dereference basic
blocks inside the dominator tree, so that we can refer to them by a
number stored inside the basic block.
@aengelke
Copy link
Contributor Author

Rebased after #102460 landed.

@Meinersbur Thanks a lot for fixing Polly!

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aengelke aengelke merged commit 8101d18 into llvm:main Aug 10, 2024
8 checks passed
@aengelke aengelke deleted the domtreecleanup4 branch August 10, 2024 16:19
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder mlir-nvidia running on mlir-nvidia while building llvm at step 6 "test-build-check-mlir-build-only-check-mlir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/138/builds/2297

Here is the relevant piece of the build log for the reference:

Step 6 (test-build-check-mlir-build-only-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-opt /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir -convert-linalg-to-loops -convert-scf-to-cf  -expand-strided-metadata -lower-affine -convert-arith-to-llvm -finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts |  /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-cpu-runner -O3 -e main -entry-point-result=void    -shared-libs=/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/lib/libmlir_runner_utils.so  | /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/FileCheck /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir
# executed command: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-opt /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir -convert-linalg-to-loops -convert-scf-to-cf -expand-strided-metadata -lower-affine -convert-arith-to-llvm -finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts
# executed command: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-cpu-runner -O3 -e main -entry-point-result=void -shared-libs=/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/lib/libmlir_runner_utils.so
# .---command stderr------------
# | mlir-cpu-runner: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-cpu-runner -O3 -e main -entry-point-result=void -shared-libs=/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/lib/libmlir_runner_utils.so
# | 1.	Running pass "function<eager-inv>(Float2IntPass,LowerConstantIntrinsicsPass,ControlHeightReductionPass,loop(LoopRotatePass<header-duplication;no-prepare-for-lto>,LoopDeletionPass),LoopDistributePass,InjectTLIMappings,LoopVectorizePass<no-interleave-forced-only;no-vectorize-forced-only;>,InferAlignmentPass,LoopLoadEliminationPass,InstCombinePass<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,SimplifyCFGPass<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,SLPVectorizerPass,VectorCombinePass,InstCombinePass<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,LoopUnrollPass<O3>,WarnMissedTransformationsPass,SROAPass<preserve-cfg>,InferAlignmentPass,InstCombinePass<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(LICMPass<allowspeculation>),AlignmentFromAssumptionsPass,LoopSinkPass,InstSimplifyPass,DivRemPairsPass,TailCallElimPass,SimplifyCFGPass<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "LLVMDialectModule"
# | 2.	Running pass "SLPVectorizerPass" on function "main"
# | Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
# | 0  libLLVMSupport.so.20.0git              0x00007bda3c597e57 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
# | 1  libLLVMSupport.so.20.0git              0x00007bda3c5959ee llvm::sys::RunSignalHandlers() + 238
# | 2  libLLVMSupport.so.20.0git              0x00007bda3c59852a
# | 3  libc.so.6                              0x00007bda3be68520
# | 4  libc.so.6                              0x00007bda3bebc9fc pthread_kill + 300
# | 5  libc.so.6                              0x00007bda3be68476 raise + 22
# | 6  libc.so.6                              0x00007bda3be4e7f3 abort + 211
# | 7  libc.so.6                              0x00007bda3be4e71b
# | 8  libc.so.6                              0x00007bda3be5fe96
# | 9  libLLVMCore.so.20.0git                 0x00007bda3caad4dd
# | 10 libLLVMAnalysis.so.20.0git             0x00007bda3d900a7a llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) + 122
# | 11 libLLVMAnalysis.so.20.0git             0x00007bda3d8f070e llvm::ScalarEvolution::createSCEVIter(llvm::Value*) + 206
# | 12 libLLVMAnalysis.so.20.0git             0x00007bda3d7fde26 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) + 406
# | 13 libLLVMVectorize.so.20.0git            0x00007bda41098362 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const + 338
# | 14 libLLVMVectorize.so.20.0git            0x00007bda4109889d llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const + 269
# | 15 libLLVMVectorize.so.20.0git            0x00007bda4108ef86 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() + 214
# | 16 libLLVMVectorize.so.20.0git            0x00007bda410e20b3 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) + 1459
# | 17 libLLVMVectorize.so.20.0git            0x00007bda410e4ca2
# | 18 libLLVMVectorize.so.20.0git            0x00007bda410e36bb llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) + 3355
# | 19 libLLVMVectorize.so.20.0git            0x00007bda410de579 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) + 2297
# | 20 libLLVMVectorize.so.20.0git            0x00007bda410dcafb llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) + 1579
# | 21 libLLVMVectorize.so.20.0git            0x00007bda410dbf6d llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 813
# | 22 libLLVMPasses.so.20.0git               0x00007bda418901ad
# | 23 libLLVMCore.so.20.0git                 0x00007bda3cb8951a llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 442
# | 24 libLLVMX86CodeGen.so.20.0git           0x00007bda45660bfd
# | 25 libLLVMCore.so.20.0git                 0x00007bda3cb8dd72 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 482
# | 26 libLLVMX86CodeGen.so.20.0git           0x00007bda456609ad
# | 27 libLLVMCore.so.20.0git                 0x00007bda3cb881da llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 442
# | 28 libMLIRExecutionEngineUtils.so.20.0git 0x00007bda4192d677
# | 29 libMLIRJitRunner.so.20.0git            0x00007bda459f975c
# | 30 libMLIRExecutionEngine.so.20.0git      0x00007bda459d37a1 mlir::ExecutionEngine::create(mlir::Operation*, mlir::ExecutionEngineOptions const&, std::unique_ptr<llvm::TargetMachine, std::default_delete<llvm::TargetMachine>>) + 7073
# | 31 libMLIRJitRunner.so.20.0git            0x00007bda459f9146
# | 32 libMLIRJitRunner.so.20.0git            0x00007bda459f593f
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-multistage running on ppc64le-clang-multistage-test while building llvm at step 10 "build stage 2".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/1738

Here is the relevant piece of the build log for the reference:

Step 10 (build stage 2) failure: 'ninja' (failure)
...
[211/6097] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/PGOOptions.cpp.o
[212/6097] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Error.cpp.o
[213/6097] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/TarWriter.cpp.o
[214/6097] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DAGDeltaAlgorithm.cpp.o
[215/6097] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MemoryBuffer.cpp.o
[216/6097] Building CXX object utils/TableGen/Basic/CMakeFiles/obj.LLVMTableGenBasic.dir/SDNodeProperties.cpp.o
[217/6097] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Memory.cpp.o
[218/6097] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FileCollector.cpp.o
[219/6097] Building CXX object lib/TableGen/CMakeFiles/LLVMTableGen.dir/Error.cpp.o
[220/6097] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SuffixTree.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/SuffixTree.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib/Support -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/lib/Support -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=global-constructors -O3 -DNDEBUG -std=c++17 -fPIC -UNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/SuffixTree.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/SuffixTree.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/SuffixTree.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/lib/Support/SuffixTree.cpp
clang++: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include/llvm/Support/GenericDomTree.h:401: llvm::DomTreeNodeBase<NodeT>* llvm::DominatorTreeBase<NodeT, IsPostDom>::getNode(const NodeT*) const [with NodeT = llvm::BasicBlock; bool IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=global-constructors -O3 -std=c++17 -fPIC -fno-exceptions -funwind-tables -fno-rtti -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/lib/Support -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/lib/Support -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage2/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/include -DNDEBUG -UNDEBUG -c -o lib/Support/CMakeFiles/LLVMSupport.dir/SuffixTree.cpp.o /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/lib/Support/SuffixTree.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/llvm/llvm/lib/Support/SuffixTree.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN4llvm12DenseMapBaseINS_8DenseMapIPNS_22SuffixTreeInternalNodeESt4pairIPNS_14SuffixTreeNodeES6_ENS_12DenseMapInfoIS3_vEENS_6detail12DenseMapPairIS3_S7_EEEES3_S7_S9_SC_E15LookupBucketForIS3_EEbRKT_RPSC_"
 #0 0x00007fff9f024f90 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMSupport.so.20.0git+0x234f90)
 #1 0x00007fff9f0228c4 llvm::sys::CleanupOnSignal(unsigned long) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMSupport.so.20.0git+0x2328c4)
 #2 0x00007fff9eedf7b8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007fffac3f04d8 (linux-vdso64.so.1+0x4d8)
 #4 0x00007fff9e84a448 raise (/lib64/libc.so.6+0x4a448)
 #5 0x00007fff9e824a54 abort (/lib64/libc.so.6+0x24a54)
 #6 0x00007fff9e83dc30 __assert_fail_base (/lib64/libc.so.6+0x3dc30)
 #7 0x00007fff9e83dcd4 __assert_fail (/lib64/libc.so.6+0x3dcd4)
 #8 0x00007fff9f43eadc llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMCore.so.20.0git+0x26eadc)
 #9 0x00007fff9ffddccc llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (.part.2394) ScalarEvolution.cpp:0:0
#10 0x00007fffa001d3fc llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMAnalysis.so.20.0git+0x4bd3fc)
#11 0x00007fff9fe9f42c llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (.part.1012) LoopAccessAnalysis.cpp:0:0
#12 0x00007fffa25a10d8 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMVectorize.so.20.0git+0x1510d8)
#13 0x00007fffa25a1718 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMVectorize.so.20.0git+0x151718)
#14 0x00007fffa25ea364 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMVectorize.so.20.0git+0x19a364)
#15 0x00007fffa260c6d4 llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMVectorize.so.20.0git+0x1bc6d4)
#16 0x00007fffa260f134 llvm::SLPVectorizerPass::tryToVectorize(llvm::Instruction*, llvm::slpvectorizer::BoUpSLP&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMVectorize.so.20.0git+0x1bf134)
#17 0x00007fffa260f380 llvm::SLPVectorizerPass::tryToVectorize(llvm::ArrayRef<llvm::WeakTrackingVH>, llvm::slpvectorizer::BoUpSLP&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMVectorize.so.20.0git+0x1bf380)
#18 0x00007fffa260f594 llvm::SLPVectorizerPass::vectorizeRootInstruction(llvm::PHINode*, llvm::Instruction*, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, llvm::TargetTransformInfo*) (.constprop.5330) SLPVectorizer.cpp:0:0
#19 0x00007fffa2613428 llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMVectorize.so.20.0git+0x1c3428)
#20 0x00007fffa2618998 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (.part.5302) SLPVectorizer.cpp:0:0
#21 0x00007fffa261aa50 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMVectorize.so.20.0git+0x1caa50)
#22 0x00007fff9dabcb64 llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/../lib/libLLVMPasses.so.20.0git+0x8cb64)
#23 0x00007fff9f584e44 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMCore.so.20.0git+0x3b4e44)
#24 0x00007fffab2a44f4 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMAMDGPUCodeGen.so.20.0git+0x3f44f4)
#25 0x00007fff9f585380 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMCore.so.20.0git+0x3b5380)
#26 0x00007fffab2a5524 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMAMDGPUCodeGen.so.20.0git+0x3f5524)
#27 0x00007fff9f583ac4 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1.install/bin/../lib/libLLVMCore.so.20.0git+0x3b3ac4)
#28 0x00007fffa3e807b0 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder flang-runtime-cuda-clang running on as-builder-7 while building llvm at step 10 "build-flang-runtime-FortranRuntime".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/7/builds/2622

Here is the relevant piece of the build log for the reference:

Step 10 (build-flang-runtime-FortranRuntime) failure: cmake (failure)
...
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/flang/runtime/../include/flang/Decimal/binary-floating-point.h:39:24: warning: declaration is not declared in any declare target region [-Wopenmp-target]
   39 |   static constexpr int significandBits{realChars.significandBits};
      |                        ^
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/flang/runtime/../include/flang/Decimal/binary-floating-point.h:51:59: note: used here
   51 |   static constexpr RawType significandMask{(RawType{1} << significandBits) - 1};
      |                                                           ^~~~~~~~~~~~~~~
1 warning generated.
10.953 [1/35/30] Building CXX object CMakeFiles/FortranRuntime.dir/memory.cpp.o
11.232 [1/34/31] Building CXX object CMakeFiles/FortranRuntime.dir/file.cpp.o
11.408 [1/33/32] Building CXX object CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o
FAILED: CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o 
/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang++ -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DOMP_OFFLOAD_BUILD -I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/flang/runtime/../include -I/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/flang-runtime -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-lto -O3 -DNDEBUG   -U_GLIBCXX_ASSERTIONS -U_LIBCPP_ENABLE_ASSERTIONS -std=c++17  -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -fopenmp -fvisibility=hidden -fopenmp-cuda-mode --offload-arch=sm_50,sm_60,sm_70,sm_80 -foffload-lto -MD -MT CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o -MF CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o.d -o CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o -c /home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/flang/runtime/ISO_Fortran_binding.cpp
clang-20: /home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:400: llvm::DomTreeNodeBase<NodeT>* llvm::DominatorTreeBase<NodeT, IsPostDom>::getNode(const NodeT*) const [with NodeT = llvm::BasicBlock; bool IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -clear-ast-before-backend -main-file-name ISO_Fortran_binding.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/flang-runtime -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/flang-runtime -resource-dir /home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/lib/clang/20 -O3 -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -std=c++17 -fconst-strings -ferror-limit 19 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -fopenmp-cuda-mode -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -vectorize-loops -vectorize-slp -fembed-offload-object=/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/ISO_Fortran_binding-cd4bd6.out -fopenmp-targets=nvptx64-nvidia-cuda -faddrsig -o CMakeFiles/FortranRuntime.dir/ISO_Fortran_binding.cpp.o -x ir /home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/ISO_Fortran_binding-99f023.bc
1.	Optimizer
2.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/build/ISO_Fortran_binding-99f023.bc"
3.	Running pass "slp-vectorizer" on function "CFI_section"
 #0 0x0000636be454ad70 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x221ed70)
 #1 0x0000636be454818f llvm::sys::RunSignalHandlers() (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x221c18f)
 #2 0x0000636be45482e5 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007270e4642520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007270e46969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x00007270e46969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x00007270e46969fc pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x00007270e4642476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x00007270e46287f3 abort ./stdlib/abort.c:81:7
 #9 0x00007270e462871b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x00007270e4639e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#11 0x0000636be3f2b3ff llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1bff3ff)
#12 0x0000636be365a910 llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x132e910)
#13 0x0000636be3670a80 llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1344a80)
#14 0x0000636be379ff78 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1473f78)
#15 0x0000636be5f47d01 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c1bd01)
#16 0x0000636be5f48242 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c1c242)
#17 0x0000636be5f759b1 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom()::'lambda'(std::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry>> const&)::operator()(std::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry>> const&) const SLPVectorizer.cpp:0:0
#18 0x0000636be5f8cd67 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c60d67)
#19 0x0000636be5fb094a llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, bool) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c8494a)
#20 0x0000636be5fb391d llvm::SLPVectorizerPass::tryToVectorize(llvm::Instruction*, llvm::slpvectorizer::BoUpSLP&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c8791d)
#21 0x0000636be5fb3a9a llvm::SLPVectorizerPass::tryToVectorize(llvm::ArrayRef<llvm::WeakTrackingVH>, llvm::slpvectorizer::BoUpSLP&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c87a9a)
#22 0x0000636be5fb42a9 llvm::SLPVectorizerPass::vectorizeRootInstruction(llvm::PHINode*, llvm::Instruction*, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, llvm::TargetTransformInfo*) (.constprop.0) SLPVectorizer.cpp:0:0
#23 0x0000636be5fb82d0 llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c8c2d0)
#24 0x0000636be5fbe660 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (.part.0) SLPVectorizer.cpp:0:0
#25 0x0000636be5fbf1c2 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x3c931c2)
#26 0x0000636be5921b76 llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x35f5b76)
#27 0x0000636be4022d6f llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1cf6d6f)
#28 0x0000636be3147ae6 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0xe1bae6)
#29 0x0000636be4021aeb llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbot/worker/as-builder-7/ramdisk/flang-runtime-cuda-clang/install-clang/bin/clang-20+0x1cf5aeb)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building llvm at step 11 "ninja Test Suite".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/2327

Here is the relevant piece of the build log for the reference:

Step 11 (ninja Test Suite) failure: build (failure)
...
6.993 [184/462/2523] Linking C executable SingleSource/UnitTests/2009-04-16-BitfieldInitialization
6.993 [184/461/2524] Linking C executable SingleSource/UnitTests/2009-12-07-StructReturn
6.993 [184/460/2525] Linking C executable SingleSource/UnitTests/2010-05-24-BitfieldTest
6.993 [184/459/2526] Linking C executable SingleSource/UnitTests/2020-01-06-coverage-001
6.994 [184/458/2527] Linking C executable SingleSource/UnitTests/2020-01-06-coverage-002
6.994 [184/457/2528] Linking C executable SingleSource/UnitTests/2020-01-06-coverage-005
6.994 [184/456/2529] Linking C executable SingleSource/UnitTests/2020-01-06-coverage-006
6.998 [184/455/2530] Building CXX object MicroBenchmarks/libs/benchmark/src/CMakeFiles/benchmark.dir/sysinfo.cc.o
6.999 [184/454/2531] Building C object MultiSource/Applications/JM/lencod/CMakeFiles/lencod.dir/mbuffer.c.o
6.999 [184/453/2532] Building C object MultiSource/Applications/obsequi/CMakeFiles/Obsequi.dir/tables.c.o
FAILED: MultiSource/Applications/obsequi/CMakeFiles/Obsequi.dir/tables.c.o 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/test/build-test-suite/tools/timeit --summary MultiSource/Applications/obsequi/CMakeFiles/Obsequi.dir/tables.c.o.time /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang -DNDEBUG  -O3 -DNDEBUG   -w -Werror=date-time -ffp-contract=off -Wno-implicit-int -DCOUNTBITS16 -DLASTBIT16 -DCOUNTMOVES_TABLE -DTWO_STAGE_GENERATION -DHASHCODEBITS=23 -MD -MT MultiSource/Applications/obsequi/CMakeFiles/Obsequi.dir/tables.c.o -MF MultiSource/Applications/obsequi/CMakeFiles/Obsequi.dir/tables.c.o.d -o MultiSource/Applications/obsequi/CMakeFiles/Obsequi.dir/tables.c.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/test/test-suite/MultiSource/Applications/obsequi/tables.c
clang: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: llvm::DomTreeNodeBase<NodeT>* llvm::DominatorTreeBase<NodeT, IsPostDom>::getNode(const NodeT*) const [with NodeT = llvm::BasicBlock; bool IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang -DNDEBUG -O3 -DNDEBUG -w -Werror=date-time -ffp-contract=off -Wno-implicit-int -DCOUNTBITS16 -DLASTBIT16 -DCOUNTMOVES_TABLE -DTWO_STAGE_GENERATION -DHASHCODEBITS=23 -MD -MT MultiSource/Applications/obsequi/CMakeFiles/Obsequi.dir/tables.c.o -MF MultiSource/Applications/obsequi/CMakeFiles/Obsequi.dir/tables.c.o.d -o MultiSource/Applications/obsequi/CMakeFiles/Obsequi.dir/tables.c.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/test/test-suite/MultiSource/Applications/obsequi/tables.c
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/test/test-suite/MultiSource/Applications/obsequi/tables.c"
4.	Running pass "slp-vectorizer" on function "init_static_tables"
 #0 0x0000000013eb7370 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x13eb7370)
 #1 0x0000000013eb4cb4 llvm::sys::CleanupOnSignal(unsigned long) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x13eb4cb4)
 #2 0x0000000013dca698 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007fff7fee04d8 (linux-vdso64.so.1+0x4d8)
 #4 0x00007fff7f77a448 raise (/lib64/libc.so.6+0x4a448)
 #5 0x00007fff7f754a54 abort (/lib64/libc.so.6+0x24a54)
 #6 0x00007fff7f76dc30 __assert_fail_base (/lib64/libc.so.6+0x3dc30)
 #7 0x00007fff7f76dcd4 __assert_fail (/lib64/libc.so.6+0x3dcd4)
 #8 0x000000001362d31c llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x1362d31c)
 #9 0x0000000012c7abcc llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (.part.2394) ScalarEvolution.cpp:0:0
#10 0x0000000012cba2fc llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x12cba2fc)
#11 0x0000000012b8e52c llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (.part.1012) LoopAccessAnalysis.cpp:0:0
#12 0x00000000159de118 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x159de118)
#13 0x00000000159de758 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x159de758)
#14 0x0000000015a26104 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x15a26104)
#15 0x0000000015a48394 llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x15a48394)
#16 0x0000000015a4dcc0 llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x15a4dcc0)
#17 0x0000000015a54a78 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (.part.5302) SLPVectorizer.cpp:0:0
#18 0x0000000015a56b30 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x15a56b30)
#19 0x00000000154a79e4 llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x154a79e4)
#20 0x0000000013765b64 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x13765b64)
#21 0x0000000010cc6d14 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x10cc6d14)
#22 0x00000000137660a0 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x137660a0)
#23 0x0000000010cc7e34 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x10cc7e34)
#24 0x00000000137647e4 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x137647e4)
#25 0x00000000141af5b0 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#26 0x00000000141b2564 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x141b2564)
#27 0x00000000148a9830 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x148a9830)
#28 0x00000000169873e4 clang::ParseAST(clang::Sema&, bool, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x169873e4)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-ppc64le-linux running on ppc64le-sanitizer while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/2103

Here is the relevant piece of the build log for the reference:

Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[1578/1855] Building CXX object libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/fallback_malloc.cpp.o
[1579/1855] Generating exported symbols for clang_rt.ubsan_minimal-powerpc64le
[1580/1855] Building CXX object compiler-rt/lib/msan/CMakeFiles/clang_rt.msan-powerpc64le.dir/msan_linux.cpp.o
[1581/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-powerpc64le.dir/tsan_flags.cpp.o
[1582/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-powerpc64le.dir/tsan_platform_posix.cpp.o
[1583/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-dynamic-powerpc64le.dir/tsan_interface_java.cpp.o
[1584/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-dynamic-powerpc64le.dir/tsan_mutexset.cpp.o
[1585/1855] Building CXX object libcxx/src/CMakeFiles/cxx_static.dir/mutex_destructor.cpp.o
[1586/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-powerpc64le.dir/tsan_interceptors_memintrinsics.cpp.o
[1587/1855] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang++ --target=powerpc64le-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
clang++: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang++ --target=powerpc64le-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN11__sanitizer12DenseMapBaseINS_8DenseMapINS_6detail12DenseMapPairIjmEEjNS_12DenseMapInfoIS4_EENS3_IS4_jEEEES4_jS6_S7_E18moveFromOldBucketsEPS7_SA_"
 #0 0x0000000134bfd2ac llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x4e9d2ac)
 #1 0x0000000134bfda04 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #2 0x0000000134bfa3b0 llvm::sys::RunSignalHandlers() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x4e9a3b0)
 #3 0x0000000134bfbf54 llvm::sys::CleanupOnSignal(unsigned long) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x4e9bf54)
 #4 0x0000000134b40598 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #5 0x00007fffbe3104d8 (linux-vdso64.so.1+0x4d8)
 #6 0x00007fffbdbaa448 raise (/lib64/libc.so.6+0x4a448)
 #7 0x00007fffbdb84a54 abort (/lib64/libc.so.6+0x24a54)
 #8 0x00007fffbdb9dc30 __assert_fail_base (/lib64/libc.so.6+0x3dc30)
 #9 0x00007fffbdb9dcd4 __assert_fail (/lib64/libc.so.6+0x3dcd4)
#10 0x000000013451325c llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x47b325c)
#11 0x0000000133bede2c llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3e8de2c)
#12 0x0000000133bda99c llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3e7a99c)
#13 0x0000000133bd05a8 llvm::ScalarEvolution::getSCEV(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3e705a8)
#14 0x0000000133cd0c68 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3f70c68)
#15 0x0000000136a7f1ec llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d1f1ec)
#16 0x0000000136a7faa0 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d1faa0)
#17 0x0000000136a750dc llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d150dc)
#18 0x0000000136acca14 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d6ca14)
#19 0x0000000136acfa98 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#20 0x0000000136acdf0c llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d6df0c)
#21 0x0000000136ac8aa0 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d68aa0)
#22 0x0000000136ac6fec llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d66fec)
#23 0x0000000136ac63b8 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d663b8)
#24 0x00000001364bb3ac llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#25 0x000000013461e350 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x48be350)
#26 0x00000001355822fc llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) BackendUtil.cpp:0:0
#27 0x0000000134623d94 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x48c3d94)
#28 0x000000013557b4bc llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) BackendUtil.cpp:0:0
Step 11 (build compiler-rt default) failure: build compiler-rt default (failure)
...
[1578/1855] Building CXX object libcxxabi/src/CMakeFiles/cxxabi_shared_objects.dir/fallback_malloc.cpp.o
[1579/1855] Generating exported symbols for clang_rt.ubsan_minimal-powerpc64le
[1580/1855] Building CXX object compiler-rt/lib/msan/CMakeFiles/clang_rt.msan-powerpc64le.dir/msan_linux.cpp.o
[1581/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-powerpc64le.dir/tsan_flags.cpp.o
[1582/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-powerpc64le.dir/tsan_platform_posix.cpp.o
[1583/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-dynamic-powerpc64le.dir/tsan_interface_java.cpp.o
[1584/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-dynamic-powerpc64le.dir/tsan_mutexset.cpp.o
[1585/1855] Building CXX object libcxx/src/CMakeFiles/cxx_static.dir/mutex_destructor.cpp.o
[1586/1855] Building CXX object compiler-rt/lib/tsan/rtl/CMakeFiles/clang_rt.tsan-powerpc64le.dir/tsan_interceptors_memintrinsics.cpp.o
[1587/1855] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang++ --target=powerpc64le-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
clang++: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang++ --target=powerpc64le-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN11__sanitizer12DenseMapBaseINS_8DenseMapINS_6detail12DenseMapPairIjmEEjNS_12DenseMapInfoIS4_EENS3_IS4_jEEEES4_jS6_S7_E18moveFromOldBucketsEPS7_SA_"
 #0 0x0000000134bfd2ac llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x4e9d2ac)
 #1 0x0000000134bfda04 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #2 0x0000000134bfa3b0 llvm::sys::RunSignalHandlers() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x4e9a3b0)
 #3 0x0000000134bfbf54 llvm::sys::CleanupOnSignal(unsigned long) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x4e9bf54)
 #4 0x0000000134b40598 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #5 0x00007fffbe3104d8 (linux-vdso64.so.1+0x4d8)
 #6 0x00007fffbdbaa448 raise (/lib64/libc.so.6+0x4a448)
 #7 0x00007fffbdb84a54 abort (/lib64/libc.so.6+0x24a54)
 #8 0x00007fffbdb9dc30 __assert_fail_base (/lib64/libc.so.6+0x3dc30)
 #9 0x00007fffbdb9dcd4 __assert_fail (/lib64/libc.so.6+0x3dcd4)
#10 0x000000013451325c llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x47b325c)
#11 0x0000000133bede2c llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3e8de2c)
#12 0x0000000133bda99c llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3e7a99c)
#13 0x0000000133bd05a8 llvm::ScalarEvolution::getSCEV(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3e705a8)
#14 0x0000000133cd0c68 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3f70c68)
#15 0x0000000136a7f1ec llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d1f1ec)
#16 0x0000000136a7faa0 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d1faa0)
#17 0x0000000136a750dc llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d150dc)
#18 0x0000000136acca14 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d6ca14)
#19 0x0000000136acfa98 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#20 0x0000000136acdf0c llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d6df0c)
#21 0x0000000136ac8aa0 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d68aa0)
#22 0x0000000136ac6fec llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d66fec)
#23 0x0000000136ac63b8 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d663b8)
#24 0x00000001364bb3ac llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#25 0x000000013461e350 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x48be350)
#26 0x00000001355822fc llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) BackendUtil.cpp:0:0
#27 0x0000000134623d94 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x48c3d94)
#28 0x000000013557b4bc llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) BackendUtil.cpp:0:0
Step 12 (test compiler-rt default) failure: test compiler-rt default (failure)
...
-- Performing Test CXX_SUPPORTS_FSIZED_DEALLOCATION_FLAG - Success
-- check-runtimes does nothing.
-- Configuring done (4.4s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    LIBCXX_HAS_GCC_S_LIB
-- Build files have been written to: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/runtimes/runtimes-bins/compiler-rt/lib/tsan/libcxx_tsan_powerpc64le
[23/147] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang++ --target=powerpc64le-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
clang++: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang++ --target=powerpc64le-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Werror -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN11__sanitizer12DenseMapBaseINS_8DenseMapINS_6detail12DenseMapPairIjmEEjNS_12DenseMapInfoIS4_EENS3_IS4_jEEEES4_jS6_S7_E18moveFromOldBucketsEPS7_SA_"
 #0 0x00000001147cd2ac llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x4e9d2ac)
 #1 0x00000001147cda04 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #2 0x00000001147ca3b0 llvm::sys::RunSignalHandlers() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x4e9a3b0)
 #3 0x00000001147cbf54 llvm::sys::CleanupOnSignal(unsigned long) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x4e9bf54)
 #4 0x0000000114710598 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #5 0x00007fff9dd204d8 (linux-vdso64.so.1+0x4d8)
 #6 0x00007fff9d5ba448 raise (/lib64/libc.so.6+0x4a448)
 #7 0x00007fff9d594a54 abort (/lib64/libc.so.6+0x24a54)
 #8 0x00007fff9d5adc30 __assert_fail_base (/lib64/libc.so.6+0x3dc30)
 #9 0x00007fff9d5adcd4 __assert_fail (/lib64/libc.so.6+0x3dcd4)
#10 0x00000001140e325c llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x47b325c)
#11 0x00000001137bde2c llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3e8de2c)
#12 0x00000001137aa99c llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3e7a99c)
#13 0x00000001137a05a8 llvm::ScalarEvolution::getSCEV(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3e705a8)
#14 0x00000001138a0c68 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x3f70c68)
#15 0x000000011664f1ec llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d1f1ec)
#16 0x000000011664faa0 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d1faa0)
#17 0x00000001166450dc llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d150dc)
#18 0x000000011669ca14 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d6ca14)
#19 0x000000011669fa98 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#20 0x000000011669df0c llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d6df0c)
#21 0x0000000116698aa0 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d68aa0)
#22 0x0000000116696fec llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d66fec)
#23 0x00000001166963b8 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x6d663b8)
#24 0x000000011608b3ac llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#25 0x00000001141ee350 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x48be350)
#26 0x00000001151522fc llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) BackendUtil.cpp:0:0
#27 0x00000001141f3d94 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/./bin/clang+++0x48c3d94)
#28 0x000000011514b4bc llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) BackendUtil.cpp:0:0
Step 13 (build standalone compiler-rt) failure: build standalone compiler-rt (failure)
...
[470/665] Building CXX object lib/asan/CMakeFiles/RTAsan.powerpc64le.dir/asan_stack.cpp.o
[471/665] Building CXX object lib/tsan/rtl/CMakeFiles/clang_rt.tsan-dynamic-powerpc64le.dir/tsan_interceptors_memintrinsics.cpp.o
[472/665] Linking CXX shared library lib/linux/libclang_rt.ubsan_minimal-powerpc64le.so
[473/665] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.powerpc64le.dir/sanitizer_linux_libcdep.cpp.o
[474/665] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_symbolizer_report.cpp.o
[475/665] Building CXX object lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-powerpc64le.dir/flags_parser.cpp.o
[476/665] Building CXX object lib/ubsan/CMakeFiles/RTUbsan.powerpc64le.dir/ubsan_diag.cpp.o
[477/665] Building CXX object lib/scudo/standalone/CMakeFiles/RTScudoStandalone.powerpc64le.dir/timing.cpp.o
[478/665] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stackdepot.cpp.o
[479/665] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.powerpc64le.dir/sanitizer_stack_store.cpp.o
FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.powerpc64le.dir/sanitizer_stack_store.cpp.o 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang++ -DHAVE_RPC_XDR_H=0 -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -Wall -Werror -Wno-unused-parameter -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
clang++: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang++ -DHAVE_RPC_XDR_H=0 -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -Wall -Werror -Wno-unused-parameter -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN11__sanitizer12DenseMapBaseINS_8DenseMapINS_6detail12DenseMapPairIjmEEjNS_12DenseMapInfoIS4_EENS3_IS4_jEEEES4_jS6_S7_E18moveFromOldBucketsEPS7_SA_"
 #0 0x000000012d17d2ac llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x4e9d2ac)
 #1 0x000000012d17da04 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #2 0x000000012d17a3b0 llvm::sys::RunSignalHandlers() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x4e9a3b0)
 #3 0x000000012d17bf54 llvm::sys::CleanupOnSignal(unsigned long) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x4e9bf54)
 #4 0x000000012d0c0598 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #5 0x00007fffb7b204d8 (linux-vdso64.so.1+0x4d8)
 #6 0x00007fffb73ba448 raise (/lib64/libc.so.6+0x4a448)
 #7 0x00007fffb7394a54 abort (/lib64/libc.so.6+0x24a54)
 #8 0x00007fffb73adc30 __assert_fail_base (/lib64/libc.so.6+0x3dc30)
 #9 0x00007fffb73adcd4 __assert_fail (/lib64/libc.so.6+0x3dcd4)
#10 0x000000012ca9325c llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x47b325c)
#11 0x000000012c16de2c llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x3e8de2c)
#12 0x000000012c15a99c llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x3e7a99c)
#13 0x000000012c1505a8 llvm::ScalarEvolution::getSCEV(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x3e705a8)
#14 0x000000012c250c68 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x3f70c68)
#15 0x000000012efff1ec llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d1f1ec)
#16 0x000000012efffaa0 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d1faa0)
#17 0x000000012eff50dc llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d150dc)
#18 0x000000012f04ca14 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d6ca14)
#19 0x000000012f04fa98 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#20 0x000000012f04df0c llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d6df0c)
#21 0x000000012f048aa0 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d68aa0)
#22 0x000000012f046fec llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d66fec)
#23 0x000000012f0463b8 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d663b8)
#24 0x000000012ea3b3ac llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#25 0x000000012cb9e350 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x48be350)
#26 0x000000012db022fc llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) BackendUtil.cpp:0:0
#27 0x000000012cba3d94 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x48c3d94)
#28 0x000000012dafb4bc llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) BackendUtil.cpp:0:0
Step 14 (test standalone compiler-rt) failure: test standalone compiler-rt (failure)
...
-- Performing Test CXX_SUPPORTS_FALIGNED_ALLOCATION_FLAG - Success
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test CXX_SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test CXX_SUPPORTS_FSIZED_DEALLOCATION_FLAG
-- Performing Test CXX_SUPPORTS_FSIZED_DEALLOCATION_FLAG - Success
-- check-runtimes does nothing.
-- Configuring done (4.7s)
-- Generating done (0.1s)
-- Build files have been written to: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le
[23/147] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o
FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o 
/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang++ -DHAVE_RPC_XDR_H=0 -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -Wall -Werror -Wno-unused-parameter -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
clang++: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang++ -DHAVE_RPC_XDR_H=0 -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/.. -Wall -Werror -Wno-unused-parameter -std=c++17 -m64 -fno-function-sections -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wglobal-constructors -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.powerpc64le.dir/sanitizer_stack_store.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN11__sanitizer12DenseMapBaseINS_8DenseMapINS_6detail12DenseMapPairIjmEEjNS_12DenseMapInfoIS4_EENS3_IS4_jEEEES4_jS6_S7_E18moveFromOldBucketsEPS7_SA_"
 #0 0x00000001072bd2ac llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x4e9d2ac)
 #1 0x00000001072bda04 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #2 0x00000001072ba3b0 llvm::sys::RunSignalHandlers() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x4e9a3b0)
 #3 0x00000001072bbf54 llvm::sys::CleanupOnSignal(unsigned long) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x4e9bf54)
 #4 0x0000000107200598 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #5 0x00007fffaf1104d8 (linux-vdso64.so.1+0x4d8)
 #6 0x00007fffae9aa448 raise (/lib64/libc.so.6+0x4a448)
 #7 0x00007fffae984a54 abort (/lib64/libc.so.6+0x24a54)
 #8 0x00007fffae99dc30 __assert_fail_base (/lib64/libc.so.6+0x3dc30)
 #9 0x00007fffae99dcd4 __assert_fail (/lib64/libc.so.6+0x3dcd4)
#10 0x0000000106bd325c llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x47b325c)
#11 0x00000001062ade2c llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x3e8de2c)
#12 0x000000010629a99c llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x3e7a99c)
#13 0x00000001062905a8 llvm::ScalarEvolution::getSCEV(llvm::Value*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x3e705a8)
#14 0x0000000106390c68 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x3f70c68)
#15 0x000000010913f1ec llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d1f1ec)
#16 0x000000010913faa0 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d1faa0)
#17 0x00000001091350dc llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d150dc)
#18 0x000000010918ca14 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d6ca14)
#19 0x000000010918fa98 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#20 0x000000010918df0c llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d6df0c)
#21 0x0000000109188aa0 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d68aa0)
#22 0x0000000109186fec llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d66fec)
#23 0x00000001091863b8 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x6d663b8)
#24 0x0000000108b7b3ac llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) PassBuilder.cpp:0:0
#25 0x0000000106cde350 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x48be350)
#26 0x0000000107c422fc llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) BackendUtil.cpp:0:0
#27 0x0000000106ce3d94 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang+++0x48c3d94)
#28 0x0000000107c3b4bc llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) BackendUtil.cpp:0:0

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder mlir-nvidia-gcc7 running on mlir-nvidia while building llvm at step 6 "test-build-check-mlir-build-only-check-mlir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/116/builds/2238

Here is the relevant piece of the build log for the reference:

Step 6 (test-build-check-mlir-build-only-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 1
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/mlir-opt /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir -convert-linalg-to-loops -convert-scf-to-cf  -expand-strided-metadata -lower-affine -convert-arith-to-llvm -finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts |  /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/mlir-cpu-runner -O3 -e main -entry-point-result=void    -shared-libs=/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/lib/libmlir_runner_utils.so  | /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/FileCheck /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir
# executed command: /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/mlir-opt /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir -convert-linalg-to-loops -convert-scf-to-cf -expand-strided-metadata -lower-affine -convert-arith-to-llvm -finalize-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts
# executed command: /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/mlir-cpu-runner -O3 -e main -entry-point-result=void -shared-libs=/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/lib/libmlir_runner_utils.so
# .---command stderr------------
# | mlir-cpu-runner: /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include/llvm/Support/GenericDomTree.h:401: llvm::DomTreeNodeBase<NodeT>* llvm::DominatorTreeBase<NodeT, IsPostDom>::getNode(const NodeT*) const [with NodeT = llvm::BasicBlock; bool IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/bin/mlir-cpu-runner -O3 -e main -entry-point-result=void -shared-libs=/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/lib/libmlir_runner_utils.so
# | 1.	Running pass "function<eager-inv>(Float2IntPass,LowerConstantIntrinsicsPass,ControlHeightReductionPass,loop(LoopRotatePass<header-duplication;no-prepare-for-lto>,LoopDeletionPass),LoopDistributePass,InjectTLIMappings,LoopVectorizePass<no-interleave-forced-only;no-vectorize-forced-only;>,InferAlignmentPass,LoopLoadEliminationPass,InstCombinePass<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,SimplifyCFGPass<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,SLPVectorizerPass,VectorCombinePass,InstCombinePass<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,LoopUnrollPass<O3>,WarnMissedTransformationsPass,SROAPass<preserve-cfg>,InferAlignmentPass,InstCombinePass<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(LICMPass<allowspeculation>),AlignmentFromAssumptionsPass,LoopSinkPass,InstSimplifyPass,DivRemPairsPass,TailCallElimPass,SimplifyCFGPass<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "LLVMDialectModule"
# | 2.	Running pass "SLPVectorizerPass" on function "main"
# | Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
# | 0  mlir-cpu-runner 0x00005a26fcbd68ab llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 59
# | 1  mlir-cpu-runner 0x00005a26fcbd3cbc
# | 2  libc.so.6       0x00007c1125a8c520
# | 3  libc.so.6       0x00007c1125ae09fc pthread_kill + 300
# | 4  libc.so.6       0x00007c1125a8c476 raise + 22
# | 5  libc.so.6       0x00007c1125a727f3 abort + 211
# | 6  libc.so.6       0x00007c1125a7271b
# | 7  libc.so.6       0x00007c1125a83e96
# | 8  mlir-cpu-runner 0x00005a26fd0fc7a8 llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const + 152
# | 9  mlir-cpu-runner 0x00005a2700223b0d llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) + 253
# | 10 mlir-cpu-runner 0x00005a2700258ddf llvm::ScalarEvolution::createSCEVIter(llvm::Value*) + 383
# | 11 mlir-cpu-runner 0x00005a270012a963 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) + 387
# | 12 mlir-cpu-runner 0x00005a26fea13925 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const + 437
# | 13 mlir-cpu-runner 0x00005a26fea13fbc llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const + 508
# | 14 mlir-cpu-runner 0x00005a26fea30312
# | 15 mlir-cpu-runner 0x00005a26fea43f5d llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() + 461
# | 16 mlir-cpu-runner 0x00005a26fea6f790 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) + 1488
# | 17 mlir-cpu-runner 0x00005a26fea70ea6
# | 18 mlir-cpu-runner 0x00005a26fea72cef llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) + 2367
# | 19 mlir-cpu-runner 0x00005a26fea735cf llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) + 1247
# | 20 mlir-cpu-runner 0x00005a26fea74a41
# | 21 mlir-cpu-runner 0x00005a26fea75357 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 951
# | 22 mlir-cpu-runner 0x00005a26fdde2181
# | 23 mlir-cpu-runner 0x00005a26fcd7b7db llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 1115
# | 24 mlir-cpu-runner 0x00005a26fd136061
# | 25 mlir-cpu-runner 0x00005a26fcd7af49 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 409
# | 26 mlir-cpu-runner 0x00005a26fd1367b1
# | 27 mlir-cpu-runner 0x00005a26fcd7992c llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 1132
# | 28 mlir-cpu-runner 0x00005a26fddd39e2
# | 29 mlir-cpu-runner 0x00005a26fddd43f0
# | 30 mlir-cpu-runner 0x00005a26fd3949f9
# | 31 mlir-cpu-runner 0x00005a26fd3a43e6 mlir::ExecutionEngine::create(mlir::Operation*, mlir::ExecutionEngineOptions const&, std::unique_ptr<llvm::TargetMachine, std::default_delete<llvm::TargetMachine>>) + 4998
# | 32 mlir-cpu-runner 0x00005a26fd396cfc
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder flang-aarch64-rel-assert running on linaro-flang-aarch64-rel-assert while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/29/builds/2073

Here is the relevant piece of the build log for the reference:

Step 5 (build-unified-tree) failure: build (failure)
...
      |                                                                 ^
1 warning generated.
3.176 [5/21/26] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_taskdeps.cpp.o
3.246 [4/21/27] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/omp-state.cpp.o
3.259 [4/20/28] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_cdecl.cpp.o
3.267 [4/19/29] Linking C shared module openmp/libompd/gdb-plugin/python-module/ompd/ompdModule.so
3.275 [4/18/30] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o
3.367 [4/17/31] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_extra.cpp.o
3.716 [4/16/32] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o
3.737 [4/15/33] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o
FAILED: openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC   -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/kmp_affinity.cpp
clang++: ../llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/kmp_affinity.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/openmp/runtime/src/kmp_affinity.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN14kmp_topology_t12canonicalizeEiiii"
 #0 0x0000aaaab4a7cb64 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1eb7b64)
 #1 0x0000aaaab4a7a928 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1eb5928)
 #2 0x0000aaaab4a7bebc llvm::sys::CleanupOnSignal(unsigned long) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1eb6ebc)
 #3 0x0000aaaab49f7990 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #4 0x0000ffff8af09598 (linux-vdso.so.1+0x598)
 #5 0x0000ffff8aa5ed78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #6 0x0000ffff8aa4baac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
 #7 0x0000ffff8aa58490 __assert_fail_base /build/glibc-Q8DG8B/glibc-2.31/assert/assert.c:89:7
 #8 0x0000ffff8aa584f4 (/lib/aarch64-linux-gnu/libc.so.6+0x2d4f4)
 #9 0x0000aaaab4583f44 llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x19bef44)
#10 0x0000aaaab3e4319c llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x127e19c)
#11 0x0000aaaab3e33608 llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x126e608)
#12 0x0000aaaab3db278c llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x11ed78c)
#13 0x0000aaaab5f95b7c llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x33d0b7c)
#14 0x0000aaaab5f9615c llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x33d115c)
#15 0x0000aaaab5f8dd14 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x33c8d14)
#16 0x0000aaaab5fd4c10 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x340fc10)
#17 0x0000aaaab5fd702c llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#18 0x0000aaaab5fd5db4 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x3410db4)
#19 0x0000aaaab5fd16e0 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x340c6e0)
#20 0x0000aaaab5fd01c4 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x340b1c4)
#21 0x0000aaaab5fcf82c llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x340a82c)
#22 0x0000aaaab465039c llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1a8b39c)
#23 0x0000aaaab4654514 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1a8f514)
#24 0x0000aaaab464f5a4 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x1a8a5a4)
#25 0x0000aaaab4c7c024 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#26 0x0000aaaab4c73544 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x20ae544)
#27 0x0000aaaab5186cf8 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x25c1cf8)
#28 0x0000aaaab6c9b098 clang::ParseAST(clang::Sema&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-rel-assert/build/./bin/clang+++0x40d6098)

@aengelke
Copy link
Contributor Author

aengelke commented Aug 10, 2024

I think this is caused by unclean(ccache-ed?) builds. I was able to reproduce locally at first, but in a clean working dir (with clean ccache), it worked fine.

I think the "root cause" is #102180, where std::conditional_t is now used depending on GraphHasNodeNumbers<NodeT *>. With a non-clean recompile, this apparently evaluates to different values in different files, causing accesses to the same field (Parent, which is checked in the assertion) at different offsets.

Not sure how to fix the bots.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder flang-aarch64-dylib running on linaro-flang-aarch64-dylib while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/1983

Here is the relevant piece of the build log for the reference:

Step 5 (build-unified-tree) failure: build (failure)
...
      |                                                                 ^
1 warning generated.
1.445 [4/13/35] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o
1.480 [4/12/36] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_ftn_extra.cpp.o
1.710 [4/11/37] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_barrier.cpp.o
1.715 [4/10/38] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/TargetValue.cpp.o
1.755 [4/9/39] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_dispatch.cpp.o
1.767 [4/8/40] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_atomic.cpp.o
1.856 [4/7/41] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_tasking.cpp.o
1.947 [4/6/42] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o
FAILED: openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC   -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/kmp_affinity.cpp
clang++: ../llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/tcwg-buildbot/worker/flang-aarch64-dylib/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/kmp_affinity.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/openmp/runtime/src/kmp_affinity.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN14kmp_topology_t12canonicalizeEiiii"
 #0 0x0000ffff8b7595b0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x8bb5b0)
 #1 0x0000ffff8b757374 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x8b9374)
 #2 0x0000ffff8b758908 llvm::sys::CleanupOnSignal(unsigned long) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x8ba908)
 #3 0x0000ffff8b695c64 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #4 0x0000ffff94890598 (linux-vdso.so.1+0x598)
 #5 0x0000ffff8aaaad78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #6 0x0000ffff8aa97aac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
 #7 0x0000ffff8aaa4490 __assert_fail_base /build/glibc-Q8DG8B/glibc-2.31/assert/assert.c:89:7
 #8 0x0000ffff8aaa44f4 (/lib/aarch64-linux-gnu/libc.so.6+0x2d4f4)
 #9 0x0000ffff8b87f0d0 llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x9e10d0)
#10 0x0000ffff8d29f0a8 llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x24010a8)
#11 0x0000ffff8d28f8c8 llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x23f18c8)
#12 0x0000ffff8d1bdf5c llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x231ff5c)
#13 0x0000ffff8ced7728 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2039728)
#14 0x0000ffff8ced7c28 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2039c28)
#15 0x0000ffff8cecf8c0 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x20318c0)
#16 0x0000ffff8cf16830 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2078830)
#17 0x0000ffff8cf18c4c llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#18 0x0000ffff8cf179d4 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x20799d4)
#19 0x0000ffff8cf13300 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2075300)
#20 0x0000ffff8cf11ce8 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2073ce8)
#21 0x0000ffff8cf11350 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0x2073350)
#22 0x0000ffff8b957b4c llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0xab9b4c)
#23 0x0000ffff8b95c284 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0xabe284)
#24 0x0000ffff8b9568e0 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libLLVM.so.20.0git+0xab88e0)
#25 0x0000ffff919f9a10 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#26 0x0000ffff919f07f4 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libclang-cpp.so.20.0git+0x22477f4)
#27 0x0000ffff91dd3e40 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libclang-cpp.so.20.0git+0x262ae40)
#28 0x0000ffff903747a0 clang::ParseAST(clang::Sema&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/bin/../lib/libclang-cpp.so.20.0git+0xbcb7a0)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder flang-aarch64-sharedlibs running on linaro-flang-aarch64-sharedlibs while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/80/builds/1980

Here is the relevant piece of the build log for the reference:

Step 5 (build-unified-tree) failure: build (failure)
...
1.120 [4/21/27] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_taskdeps.cpp.o
1.312 [4/20/28] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_sched.cpp.o
1.332 [4/19/29] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/thirdparty/ittnotify/ittnotify_static.cpp.o
1.403 [4/18/30] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_collapse.cpp.o
1.480 [4/17/31] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/omp-debug.cpp.o
1.641 [4/16/32] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o
1.669 [4/15/33] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/omp-icv.cpp.o
1.689 [4/14/34] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o
1.876 [4/13/35] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o
2.138 [4/12/36] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o
FAILED: openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC   -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src/kmp_affinity.cpp
clang++: ../llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src/kmp_affinity.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/llvm-project/openmp/runtime/src/kmp_affinity.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN14kmp_topology_t12canonicalizeEiiii"
 #0 0x0000ffff93482398 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMSupport.so.20.0git+0x184398)
 #1 0x0000ffff9348015c llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMSupport.so.20.0git+0x18215c)
 #2 0x0000ffff934816f0 llvm::sys::CleanupOnSignal(unsigned long) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMSupport.so.20.0git+0x1836f0)
 #3 0x0000ffff933bea4c CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #4 0x0000ffff9841b598 (linux-vdso.so.1+0x598)
 #5 0x0000ffff92f08d78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #6 0x0000ffff92ef5aac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
 #7 0x0000ffff92f02490 __assert_fail_base /build/glibc-Q8DG8B/glibc-2.31/assert/assert.c:89:7
 #8 0x0000ffff92f024f4 (/lib/aarch64-linux-gnu/libc.so.6+0x2d4f4)
 #9 0x0000ffff937d36a4 llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMCore.so.20.0git+0x2016a4)
#10 0x0000ffff940a678c llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMAnalysis.so.20.0git+0x36178c)
#11 0x0000ffff94096b04 llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMAnalysis.so.20.0git+0x351b04)
#12 0x0000ffff93fb0c6c llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMAnalysis.so.20.0git+0x26bc6c)
#13 0x0000ffff95dfd9f0 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMVectorize.so.20.0git+0xda9f0)
#14 0x0000ffff95dfdf84 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMVectorize.so.20.0git+0xdaf84)
#15 0x0000ffff95df5b88 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMVectorize.so.20.0git+0xd2b88)
#16 0x0000ffff95e3e36c llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMVectorize.so.20.0git+0x11b36c)
#17 0x0000ffff95e40788 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#18 0x0000ffff95e3f510 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMVectorize.so.20.0git+0x11c510)
#19 0x0000ffff95e3ae3c llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMVectorize.so.20.0git+0x117e3c)
#20 0x0000ffff95e39824 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMVectorize.so.20.0git+0x116824)
#21 0x0000ffff95e38e8c llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMVectorize.so.20.0git+0x115e8c)
#22 0x0000ffff938ae300 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMCore.so.20.0git+0x2dc300)
#23 0x0000ffff938b2a38 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMCore.so.20.0git+0x2e0a38)
#24 0x0000ffff938ad094 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libLLVMCore.so.20.0git+0x2db094)
#25 0x0000ffff9711eee0 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#26 0x0000ffff97114278 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libclangCodeGen.so.20.0git+0xef278)
#27 0x0000ffff97510284 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/libclangCodeGen.so.20.0git+0x4eb284)
#28 0x0000ffff90301708 clang::ParseAST(clang::Sema&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/bin/../lib/../lib/libclangParse.so.20.0git+0x39708)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder flang-aarch64-latest-gcc running on linaro-flang-aarch64-latest-gcc while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/1928

Here is the relevant piece of the build log for the reference:

Step 5 (build-unified-tree) failure: build (failure)
...
2.308 [4/17/31] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/thirdparty/ittnotify/ittnotify_static.cpp.o
2.554 [4/16/32] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/omp-debug.cpp.o
2.583 [4/15/33] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_lock.cpp.o
2.736 [4/14/34] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_csupport.cpp.o
2.881 [4/13/35] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o
3.123 [4/12/36] Building CXX object openmp/libompd/src/CMakeFiles/ompd.dir/omp-icv.cpp.o
3.213 [4/11/37] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o
3.516 [4/10/38] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_dispatch.cpp.o
3.544 [4/9/39] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_barrier.cpp.o
3.556 [4/8/40] Building CXX object openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o
FAILED: openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o 
/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC   -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src/kmp_affinity.cpp
clang++: ../llvm-project/llvm/include/llvm/Support/GenericDomTree.h:400: llvm::DomTreeNodeBase<NodeT>* llvm::DominatorTreeBase<NodeT, IsPostDom>::getNode(const NodeT*) const [with NodeT = llvm::BasicBlock; bool IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/./bin/clang++ --target=aarch64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Domp_EXPORTS -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/runtimes/runtimes-bins/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src/i18n -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src/include -I/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src/thirdparty/ittnotify -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -fcolor-diagnostics -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -fPIC -D _GNU_SOURCE -D _REENTRANT -U_GLIBCXX_ASSERTIONS -UNDEBUG -std=c++17 -fno-exceptions -fno-rtti -Wno-covered-switch-default -Wno-frame-address -Wno-strict-aliasing -Wno-switch -Wno-uninitialized -Wno-return-type-c-linkage -Wno-cast-qual -Wno-int-to-void-pointer-cast -MD -MT openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -MF openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o.d -o openmp/runtime/src/CMakeFiles/omp.dir/kmp_affinity.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src/kmp_affinity.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/llvm-project/openmp/runtime/src/kmp_affinity.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN14kmp_topology_t12canonicalizeEiiii"
 #0 0x0000ffffb9658e34 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMSupport.so.20.0git+0x1bce34)
 #1 0x0000ffffb96565b0 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMSupport.so.20.0git+0x1ba5b0)
 #2 0x0000ffffb9564674 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x0000ffffbe650598 (linux-vdso.so.1+0x598)
 #4 0x0000ffffb90ebd78 raise /build/glibc-Q8DG8B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x0000ffffb90d8aac abort /build/glibc-Q8DG8B/glibc-2.31/stdlib/abort.c:81:7
 #6 0x0000ffffb90e5490 __assert_fail_base /build/glibc-Q8DG8B/glibc-2.31/assert/assert.c:89:7
 #7 0x0000ffffb90e54f4 (/lib/aarch64-linux-gnu/libc.so.6+0x2d4f4)
 #8 0x0000ffffb99c30d4 llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMCore.so.20.0git+0x2190d4)
 #9 0x0000ffffba3084e8 llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMAnalysis.so.20.0git+0x39d4e8)
#10 0x0000ffffba31f968 llvm::ScalarEvolution::createSCEVIter(llvm::Value*) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMAnalysis.so.20.0git+0x3b4968)
#11 0x0000ffffba20a9c0 llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMAnalysis.so.20.0git+0x29f9c0)
#12 0x0000ffffbc15556c llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMVectorize.so.20.0git+0x12056c)
#13 0x0000ffffbc155bc8 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMVectorize.so.20.0git+0x120bc8)
#14 0x0000ffffbc1a2654 llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMVectorize.so.20.0git+0x16d654)
#15 0x0000ffffbc1bb254 llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMVectorize.so.20.0git+0x186254)
#16 0x0000ffffbc1bc7c8 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::'lambda'(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&)::operator()(std::set<std::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::allocator<std::pair<unsigned int, int>>> const&) const SLPVectorizer.cpp:0:0
#17 0x0000ffffbc1be0f8 llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMVectorize.so.20.0git+0x1890f8)
#18 0x0000ffffbc1bec74 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMVectorize.so.20.0git+0x189c74)
#19 0x0000ffffbc1bff34 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMVectorize.so.20.0git+0x18af34)
#20 0x0000ffffbc1c0a30 llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMVectorize.so.20.0git+0x18ba30)
#21 0x0000ffffb7ed227c llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/../lib/libLLVMPasses.so.20.0git+0x7727c)
#22 0x0000ffffb9ab7194 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMCore.so.20.0git+0x30d194)
#23 0x0000ffffbd2dc11c llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libclangCodeGen.so.20.0git+0xef11c)
#24 0x0000ffffb9ab5dc8 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMCore.so.20.0git+0x30bdc8)
#25 0x0000ffffbd2dbe4c llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libclangCodeGen.so.20.0git+0xeee4c)
#26 0x0000ffffb9ab38c8 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libLLVMCore.so.20.0git+0x3098c8)
#27 0x0000ffffbd2f1778 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#28 0x0000ffffbd2f4114 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/tcwg-buildbot/worker/flang-aarch64-latest-gcc/build/bin/../lib/libclangCodeGen.so.20.0git+0x107114)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 10, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-bootstrap-ubsan running on sanitizer-buildbot4 while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/25/builds/1543

Here is the relevant piece of the build log for the reference:

Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[1728/5909] Building CXX object lib/ExecutionEngine/JITLink/CMakeFiles/LLVMJITLink.dir/JITLinkGeneric.cpp.o
[1729/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/EPCGenericDylibManager.cpp.o
[1730/5909] Building CXX object lib/DebugInfo/LogicalView/CMakeFiles/LLVMDebugInfoLogicalView.dir/Core/LVScope.cpp.o
[1731/5909] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/LoopVectorize.cpp.o
[1732/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/LookupAndRecordAddrs.cpp.o
[1733/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/IRCompileLayer.cpp.o
[1734/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/IRTransformLayer.cpp.o
[1735/5909] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/SymbolCache.cpp.o
[1736/5909] Building CXX object lib/DebugInfo/LogicalView/CMakeFiles/LLVMDebugInfoLogicalView.dir/Readers/LVDWARFReader.cpp.o
[1737/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o
FAILED: lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o 
/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/include -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -MF lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o.d -o lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -c /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
clang++: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/include -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -MF lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o.d -o lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -c /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN4llvm3orc14OrcMips32_Base23writeIndirectStubsBlockEPcNS0_12ExecutorAddrES3_j"
 #0 0x000056049a6c7afe llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:13
 #1 0x000056049a6c47dd llvm::sys::RunSignalHandlers() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Signals.cpp:106:18
 #2 0x000056049a5f4310 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 #3 0x000056049a5f45b5 CrashRecoverySignalHandler(int) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:391:1
 #4 0x00007b3873a45320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320)
 #5 0x00007b3873a9eb1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb1c)
 #6 0x00007b3873a4526e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4526e)
 #7 0x00007b3873a288ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
 #8 0x00007b3873a2881b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
 #9 0x00007b3873a3b507 (/lib/x86_64-linux-gnu/libc.so.6+0x3b507)
#10 0x0000560499d6fe6d llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:400:5
#11 0x00005604992cbe05 isReachableFromEntry /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:460:77
#12 0x00005604992cbe05 isReachableFromEntry /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:457:12
#13 0x00005604992cbe05 llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp:7454:13
#14 0x00005604992b840a llvm::ScalarEvolution::createSCEVIter(llvm::Value*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp:7430:9
#15 0x000056049919463f llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/LoopAccessAnalysis.cpp:1600:31
#16 0x000056049c9aa959 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6044:9
#17 0x000056049c9ab3b4 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6123:9
#18 0x000056049c99e48b empty /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:95:46
#19 0x000056049c99e48b operator() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5340:37
#20 0x000056049c99e48b for_each<std::__1::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::__1::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry> > *, (lambda at /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5335:30)> /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include/c++/v1/__algorithm/for_each.h:34:5
#21 0x000056049c99e48b for_each<llvm::SmallVector<std::__1::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::__1::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry> >, 8U> &, (lambda at /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5335:30)> /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1716:10
#22 0x000056049c99e48b llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5335:3
#23 0x000056049ca0dc0c llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16204:5
#24 0x000056049ca1186d llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::__1::set<std::__1::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::__1::allocator<std::__1::pair<unsigned int, int>>> const&) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16422:19
#25 0x000056049ca0fb7e llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16641:18
#26 0x000056049ca08876 tryToVectorizeSequence<llvm::StoreInst> /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:18631:9
#27 0x000056049ca08876 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:19397:16
#28 0x000056049ca06f12 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16123:15
Step 12 (build stage3/ubsan build) failure: build stage3/ubsan build (failure)
...
[1728/5909] Building CXX object lib/ExecutionEngine/JITLink/CMakeFiles/LLVMJITLink.dir/JITLinkGeneric.cpp.o
[1729/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/EPCGenericDylibManager.cpp.o
[1730/5909] Building CXX object lib/DebugInfo/LogicalView/CMakeFiles/LLVMDebugInfoLogicalView.dir/Core/LVScope.cpp.o
[1731/5909] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/LoopVectorize.cpp.o
[1732/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/LookupAndRecordAddrs.cpp.o
[1733/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/IRCompileLayer.cpp.o
[1734/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/IRTransformLayer.cpp.o
[1735/5909] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/SymbolCache.cpp.o
[1736/5909] Building CXX object lib/DebugInfo/LogicalView/CMakeFiles/LLVMDebugInfoLogicalView.dir/Readers/LVDWARFReader.cpp.o
[1737/5909] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o
FAILED: lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o 
/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/include -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -MF lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o.d -o lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -c /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
clang++: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/include -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -MF lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o.d -o lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -c /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN4llvm3orc14OrcMips32_Base23writeIndirectStubsBlockEPcNS0_12ExecutorAddrES3_j"
 #0 0x000056049a6c7afe llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:13
 #1 0x000056049a6c47dd llvm::sys::RunSignalHandlers() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Signals.cpp:106:18
 #2 0x000056049a5f4310 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 #3 0x000056049a5f45b5 CrashRecoverySignalHandler(int) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:391:1
 #4 0x00007b3873a45320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320)
 #5 0x00007b3873a9eb1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb1c)
 #6 0x00007b3873a4526e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4526e)
 #7 0x00007b3873a288ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
 #8 0x00007b3873a2881b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
 #9 0x00007b3873a3b507 (/lib/x86_64-linux-gnu/libc.so.6+0x3b507)
#10 0x0000560499d6fe6d llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:400:5
#11 0x00005604992cbe05 isReachableFromEntry /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:460:77
#12 0x00005604992cbe05 isReachableFromEntry /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:457:12
#13 0x00005604992cbe05 llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp:7454:13
#14 0x00005604992b840a llvm::ScalarEvolution::createSCEVIter(llvm::Value*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp:7430:9
#15 0x000056049919463f llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/LoopAccessAnalysis.cpp:1600:31
#16 0x000056049c9aa959 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6044:9
#17 0x000056049c9ab3b4 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6123:9
#18 0x000056049c99e48b empty /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:95:46
#19 0x000056049c99e48b operator() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5340:37
#20 0x000056049c99e48b for_each<std::__1::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::__1::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry> > *, (lambda at /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5335:30)> /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include/c++/v1/__algorithm/for_each.h:34:5
#21 0x000056049c99e48b for_each<llvm::SmallVector<std::__1::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::__1::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry> >, 8U> &, (lambda at /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5335:30)> /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1716:10
#22 0x000056049c99e48b llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5335:3
#23 0x000056049ca0dc0c llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16204:5
#24 0x000056049ca1186d llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::__1::set<std::__1::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::__1::allocator<std::__1::pair<unsigned int, int>>> const&) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16422:19
#25 0x000056049ca0fb7e llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16641:18
#26 0x000056049ca08876 tryToVectorizeSequence<llvm::StoreInst> /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:18631:9
#27 0x000056049ca08876 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:19397:16
#28 0x000056049ca06f12 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16123:15
Step 13 (stage3/ubsan check) failure: stage3/ubsan check (failure)
...
[88/5195] Building HexagonGenInstrInfo.inc...
[89/5195] Building ARMGenInstrInfo.inc...
[90/5195] Building CXX object lib/Target/AVR/MCTargetDesc/CMakeFiles/LLVMAVRDesc.dir/AVRMCAsmInfo.cpp.o
[91/5195] Building AArch64GenFastISel.inc...
[92/5195] Building CXX object lib/Target/AVR/TargetInfo/CMakeFiles/LLVMAVRInfo.dir/AVRTargetInfo.cpp.o
[93/5195] Building CXX object lib/Target/AVR/MCTargetDesc/CMakeFiles/LLVMAVRDesc.dir/AVRInstPrinter.cpp.o
[94/5195] Building AArch64GenGlobalISel.inc...
[95/5195] Building CXX object lib/Target/BPF/TargetInfo/CMakeFiles/LLVMBPFInfo.dir/BPFTargetInfo.cpp.o
[96/5195] Building CXX object lib/Target/AVR/MCTargetDesc/CMakeFiles/LLVMAVRDesc.dir/AVRELFObjectWriter.cpp.o
[97/5195] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o
FAILED: lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o 
/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/include -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -MF lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o.d -o lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -c /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
clang++: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:401: DomTreeNodeBase<NodeT> *llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(const NodeT *) const [NodeT = llvm::BasicBlock, IsPostDom = false]: Assertion `(!BB || Parent == NodeTrait::getParent(const_cast<NodeT *>(BB))) && "cannot get DomTreeNode of block with different parent"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/include -I/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -MF lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o.d -o lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/OrcABISupport.cpp.o -c /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
1.	<eof> parser at end of file
2.	Optimizer
3.	Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp"
4.	Running pass "slp-vectorizer" on function "_ZN4llvm3orc14OrcMips32_Base23writeIndirectStubsBlockEPcNS0_12ExecutorAddrES3_j"
 #0 0x000063eb24663afe llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:13
 #1 0x000063eb246607dd llvm::sys::RunSignalHandlers() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/Signals.cpp:106:18
 #2 0x000063eb24590310 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 #3 0x000063eb245905b5 CrashRecoverySignalHandler(int) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:391:1
 #4 0x00007abae1245320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320)
 #5 0x00007abae129eb1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb1c)
 #6 0x00007abae124526e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4526e)
 #7 0x00007abae12288ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
 #8 0x00007abae122881b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
 #9 0x00007abae123b507 (/lib/x86_64-linux-gnu/libc.so.6+0x3b507)
#10 0x000063eb23d0be6d llvm::DominatorTreeBase<llvm::BasicBlock, false>::getNode(llvm::BasicBlock const*) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:400:5
#11 0x000063eb23267e05 isReachableFromEntry /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:460:77
#12 0x000063eb23267e05 isReachableFromEntry /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/GenericDomTree.h:457:12
#13 0x000063eb23267e05 llvm::ScalarEvolution::getOperandsToCreate(llvm::Value*, llvm::SmallVectorImpl<llvm::Value*>&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp:7454:13
#14 0x000063eb2325440a llvm::ScalarEvolution::createSCEVIter(llvm::Value*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp:7430:9
#15 0x000063eb2313063f llvm::getPointersDiff(llvm::Type*, llvm::Value*, llvm::Type*, llvm::Value*, llvm::DataLayout const&, llvm::ScalarEvolution&, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Analysis/LoopAccessAnalysis.cpp:1600:31
#16 0x000063eb26946959 llvm::slpvectorizer::BoUpSLP::canFormVector(llvm::ArrayRef<llvm::StoreInst*>, llvm::SmallVector<unsigned int, 4u>&) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6044:9
#17 0x000063eb269473b4 llvm::slpvectorizer::BoUpSLP::findExternalStoreUsersReorderIndices(llvm::slpvectorizer::BoUpSLP::TreeEntry*) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6123:9
#18 0x000063eb2693a48b empty /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/SmallVector.h:95:46
#19 0x000063eb2693a48b operator() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5340:37
#20 0x000063eb2693a48b for_each<std::__1::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::__1::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry> > *, (lambda at /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5335:30)> /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include/c++/v1/__algorithm/for_each.h:34:5
#21 0x000063eb2693a48b for_each<llvm::SmallVector<std::__1::unique_ptr<llvm::slpvectorizer::BoUpSLP::TreeEntry, std::__1::default_delete<llvm::slpvectorizer::BoUpSLP::TreeEntry> >, 8U> &, (lambda at /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5335:30)> /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1716:10
#22 0x000063eb2693a48b llvm::slpvectorizer::BoUpSLP::reorderTopToBottom() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5335:3
#23 0x000063eb269a9c0c llvm::SLPVectorizerPass::vectorizeStoreChain(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, unsigned int, unsigned int, unsigned int&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16204:5
#24 0x000063eb269ad86d llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::$_0::operator()(std::__1::set<std::__1::pair<unsigned int, int>, llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&)::StoreDistCompare, std::__1::allocator<std::__1::pair<unsigned int, int>>> const&) const /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16422:19
#25 0x000063eb269abb7e llvm::SLPVectorizerPass::vectorizeStores(llvm::ArrayRef<llvm::StoreInst*>, llvm::slpvectorizer::BoUpSLP&, llvm::DenseSet<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, llvm::DenseMapInfo<std::__1::tuple<llvm::Value*, llvm::Value*, llvm::Value*, llvm::Value*, unsigned int>, void>>&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16641:18
#26 0x000063eb269a4876 tryToVectorizeSequence<llvm::StoreInst> /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:18631:9
#27 0x000063eb269a4876 llvm::SLPVectorizerPass::vectorizeStoreChains(llvm::slpvectorizer::BoUpSLP&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:19397:16
#28 0x000063eb269a2f12 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:16123:15

@aengelke
Copy link
Contributor Author

Now where the bot spam is over, I repeat my comment from above (I don't expect anyone to look for comments in a wave of error messages...)

I think this is caused by unclean(ccache-ed?) builds. I was able to reproduce locally at first, but in a clean working dir (with clean ccache), it worked fine.

I think the "root cause" is #102180, where std::conditional_t is now used depending on GraphHasNodeNumbers<NodeT *>. With a non-clean recompile, this apparently evaluates to different values in different files, causing accesses to the same field (Parent, which is checked in the assertion) at different offsets.

Not sure how to fix the bots.

@dyung
Copy link
Collaborator

dyung commented Aug 10, 2024

I don't think this is strictly related to ccache. We are seeing many internal tests fail with the exact same assertion failure message that I am now trying to bisect and highly suspect this change as it is the only one in the range that seems likely to have caused the issue.

@dyung
Copy link
Collaborator

dyung commented Aug 10, 2024

In the meantime, can we revert this change since there are so many bot failures and that continue to fail so that we can get them back to green?

I will try to work on one of our internal test failures to try and get a repro for the assertion failure that will hopefully be representative if you cannot reproduce the failure from the build bots.

@dyung
Copy link
Collaborator

dyung commented Aug 11, 2024

@aengelke I have put a reduced test case in issue #102784 that shows the assertion failure with your change.

aengelke added a commit that referenced this pull request Aug 13, 2024
A dominance query of a block that is in a different function is
ill-defined, so assert that getNode() is only called for blocks that are
in the same function.

There are three cases, where this behavior did occur. LoopFuse didn't
explicitly do this, but didn't invalidate the SCEV block dispositions,
leaving dangling pointers to free'ed basic blocks behind, causing
use-after-free. We do, however, want to be able to dereference basic
blocks inside the dominator tree, so that we can refer to them by a
number stored inside the basic block.

Reverts #102780
Reland #101198
Fixes #102784

Co-authored-by: Alexis Engelke <[email protected]>
kartcq added a commit to kartcq/llvm-project that referenced this pull request Dec 18, 2024
The patch llvm#102460 already implements separate DT/LI/SE for
parallel sub function. Crashes have been reported while
region generator tries using oringinal function's DT while
creating new parallel sub function due to checks in llvm#101198.
This patch aims at fixing those cases by switching the DT/LI
while generating parallel function using Region Generator.

Fixes llvm#117877
kartcq added a commit that referenced this pull request Jan 8, 2025
The patch #102460 already implements separate DT/LI/SE for parallel sub
function. Crashes have been reported while region generator tries using
oringinal function's DT while creating new parallel sub function due to
checks in #101198. This patch aims at fixing those cases by switching
the DT/LI while generating parallel function using Region Generator.

Fixes #117877
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants