https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114403
--- Comment #2 from Sam James <sjames at gcc dot gnu.org> --- Better output (includes the assertion failure): ``` $ /home/sam/data/build/llvm-project-test/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -stop-after=legalizer -o - /home/sam/git/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll llc: /home/sam/git/llvm-project/llvm/include/llvm/ADT/ScopedHashTable.h:243: llvm::ScopedHashTableScope<K, V, KInfo, AllocatorTy>::~ScopedHashTableScope() [with K = {anonymous}::CallValue; V = std::pair<llvm::Instruction*, unsigned int>; KInfo = llvm::DenseMapInfo<{anonymous}::CallValue>; AllocatorTy = llvm::MallocAllocator]: Assertion `HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry && "Scope imbalance!"' failed. PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: /home/sam/data/build/llvm-project-test/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -stop-after=legalizer -o - /home/sam/git/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll 1. Running pass 'Function Pass Manager' on module '/home/sam/git/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.sample.a16.ll'. 2. Running pass 'Early CSE' on function '@sample_d_2d' #0 0x00007f1df2a1709f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/sam/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:602:22 #1 0x00007f1df2a1411b llvm::sys::RunSignalHandlers() /home/sam/git/llvm-project/llvm/lib/Support/Signals.cpp:104:20 #2 0x00007f1df2a1411b SignalHandler(int) /home/sam/git/llvm-project/llvm/lib/Support/Unix/Signals.inc:403:31 #3 0x00007f1df226ac10 (/usr/lib64/libc.so.6+0x3bc10) #4 0x00007f1df22c029c (/usr/lib64/libc.so.6+0x9129c) #5 0x00007f1df226ab62 raise (/usr/lib64/libc.so.6+0x3bb62) #6 0x00007f1df22534f0 abort (/usr/lib64/libc.so.6+0x244f0) #7 0x00007f1df2253418 (/usr/lib64/libc.so.6+0x24418) #8 0x00007f1df2263392 (/usr/lib64/libc.so.6+0x34392) #9 0x00007f1df412f794 ~ScopedHashTableScope /home/sam/git/llvm-project/llvm/include/llvm/ADT/ScopedHashTable.h:243:7 #10 0x00007f1df412f794 ~ScopedHashTableScope /home/sam/git/llvm-project/llvm/include/llvm/ADT/ScopedHashTable.h:235:1 #11 0x00007f1df412f794 ~NodeScope /home/sam/git/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp:667:9 #12 0x00007f1df412f794 ~StackNode /home/sam/git/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp:687:9 #13 0x00007f1df412f794 (anonymous namespace)::EarlyCSE::run() /home/sam/git/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp:1708:14 #14 0x00007f1df4131085 (anonymous namespace)::EarlyCSELegacyCommonPass<false>::runOnFunction(llvm::Function&) /home/sam/git/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp:1782:3 #15 0x00007f1df2ee1291 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/sam/git/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1435:40 #16 0x00007f1df2ee179c llvm::ilist_node_base<false>::getNext() const /home/sam/git/llvm-project/llvm/include/llvm/ADT/ilist_node_base.h:29:45 #17 0x00007f1df2ee179c llvm::ilist_node_impl<llvm::ilist_detail::node_options<llvm::Function, false, false, void>>::getNext() /home/sam/git/llvm-project/llvm/include/llvm/ADT/ilist_node.h:67:66 #18 0x00007f1df2ee179c llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, false, false, void>, false, false>::operator++() /home/sam/git/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:157:25 #19 0x00007f1df2ee179c llvm::FPPassManager::runOnModule(llvm::Module&) /home/sam/git/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1480:22 #20 0x00007f1df2ee1f5d runOnModule /home/sam/git/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1557:7 #21 0x00007f1df2ee1f5d llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/sam/git/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:535:55 #22 0x000055c1916feb5b compileModule(char**, llvm::LLVMContext&) /home/sam/git/llvm-project/llvm/tools/llc/llc.cpp:754:66 #23 0x000055c1916f3753 main /home/sam/git/llvm-project/llvm/tools/llc/llc.cpp:416:5 #24 0x00007f1df2254e58 (/usr/lib64/libc.so.6+0x25e58) #25 0x00007f1df2254f15 __libc_start_main (/usr/lib64/libc.so.6+0x25f15) #26 0x000055c1916f3d01 _start (/home/sam/data/build/llvm-project-test/bin/llc+0x10d01) Aborted ```