[llvm] [TableGen] Introduce MatcherList to manage a linked list of Matchers. NFC (PR #177875)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 13 18:00:52 PST 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `amdgpu-offload-ubuntu-22-cmake-build-only` running on `rocm-docker-ubu-22` while building `llvm` at step 4 "annotate".

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

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[4859/8488] Building X86GenFastISel.inc...
[4860/8488] Linking CXX shared library lib/libLLVMCoverage.so.23.0git
[4861/8488] Creating library symlink lib/libLLVMCoverage.so
[4862/8488] Building Options.inc...
[4863/8488] Building X86GenRegisterBank.inc...
[4864/8488] Building Options.inc...
[4865/8488] Building CXX object lib/ToolDrivers/llvm-dlltool/CMakeFiles/LLVMDlltoolDriver.dir/DlltoolDriver.cpp.o
[4866/8488] Building CXX object lib/ToolDrivers/llvm-lib/CMakeFiles/LLVMLibDriver.dir/LibDriver.cpp.o
[4867/8488] Linking CXX shared library lib/libLLVMTextAPIBinaryReader.so.23.0git
[4868/8488] Building X86GenDAGISel.inc...
FAILED: lib/Target/X86/X86GenDAGISel.inc /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/Target/X86/X86GenDAGISel.inc 
cd /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/Target/X86 && /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/bin/llvm-tblgen -gen-dag-isel -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target/X86 -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/include -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/include -I /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target -omit-comments /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target/X86/X86.td --write-if-changed -o /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/Target/X86/X86GenDAGISel.inc
llvm-tblgen: /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/utils/TableGen/DAGISelMatcherOpt.cpp:486: void FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator): Assertion `!Optn == !Tmp && "Expected all to be null if any are null"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.	Program arguments: /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/bin/llvm-tblgen -gen-dag-isel -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target/X86 -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/include -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/include -I /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target -omit-comments /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target/X86/X86.td --write-if-changed -o /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/Target/X86/X86GenDAGISel.inc
 #0 0x0000731bd0a16960 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/bin/../lib/libLLVMSupport.so.23.0git+0x216960)
 #1 0x0000731bd0a1363f llvm::sys::RunSignalHandlers() (/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/bin/../lib/libLLVMSupport.so.23.0git+0x21363f)
 #2 0x0000731bd0a13792 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x0000731bd03ed520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x0000731bd04419fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x0000731bd03ed476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x0000731bd03d37f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x0000731bd03d371b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x0000731bd03e4e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x00005fd0afdf0c16 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#10 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#11 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#12 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#13 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#14 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#15 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#16 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#17 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#18 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#19 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#20 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#21 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#22 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#23 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#24 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#25 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#26 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#27 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#28 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#29 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#30 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#31 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#32 0x00005fd0afdc7ffc llvm::TableGen::Emitter::OptClass<(anonymous namespace)::DAGISelEmitter>::run(llvm::StringRef, llvm::RecordKeeper const&) DAGISelEmitter.cpp:0:0
Step 7 (build cmake config) failure: build cmake config (failure)
...
[4859/8488] Building X86GenFastISel.inc...
[4860/8488] Linking CXX shared library lib/libLLVMCoverage.so.23.0git
[4861/8488] Creating library symlink lib/libLLVMCoverage.so
[4862/8488] Building Options.inc...
[4863/8488] Building X86GenRegisterBank.inc...
[4864/8488] Building Options.inc...
[4865/8488] Building CXX object lib/ToolDrivers/llvm-dlltool/CMakeFiles/LLVMDlltoolDriver.dir/DlltoolDriver.cpp.o
[4866/8488] Building CXX object lib/ToolDrivers/llvm-lib/CMakeFiles/LLVMLibDriver.dir/LibDriver.cpp.o
[4867/8488] Linking CXX shared library lib/libLLVMTextAPIBinaryReader.so.23.0git
[4868/8488] Building X86GenDAGISel.inc...
FAILED: lib/Target/X86/X86GenDAGISel.inc /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/Target/X86/X86GenDAGISel.inc 
cd /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/Target/X86 && /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/bin/llvm-tblgen -gen-dag-isel -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target/X86 -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/include -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/include -I /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target -omit-comments /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target/X86/X86.td --write-if-changed -o /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/Target/X86/X86GenDAGISel.inc
llvm-tblgen: /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/utils/TableGen/DAGISelMatcherOpt.cpp:486: void FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator): Assertion `!Optn == !Tmp && "Expected all to be null if any are null"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.	Program arguments: /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/bin/llvm-tblgen -gen-dag-isel -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target/X86 -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/include -I/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/include -I /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target -omit-comments /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/llvm-project/llvm/lib/Target/X86/X86.td --write-if-changed -o /home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/lib/Target/X86/X86GenDAGISel.inc
 #0 0x0000731bd0a16960 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/bin/../lib/libLLVMSupport.so.23.0git+0x216960)
 #1 0x0000731bd0a1363f llvm::sys::RunSignalHandlers() (/home/botworker/bbot/amdgpu-offload-ubuntu-22-cmake-build-only/build/bin/../lib/libLLVMSupport.so.23.0git+0x21363f)
 #2 0x0000731bd0a13792 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x0000731bd03ed520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x0000731bd04419fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x0000731bd03ed476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x0000731bd03d37f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x0000731bd03d371b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x0000731bd03e4e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x00005fd0afdf0c16 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#10 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#11 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#12 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#13 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#14 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#15 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#16 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#17 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#18 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#19 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#20 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#21 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#22 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#23 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#24 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#25 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#26 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#27 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#28 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#29 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#30 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#31 0x00005fd0afdefe27 FactorScope(llvm::MatcherList&, llvm::MatcherList::iterator_impl<false>) DAGISelMatcherOpt.cpp:0:0
#32 0x00005fd0afdc7ffc llvm::TableGen::Emitter::OptClass<(anonymous namespace)::DAGISelEmitter>::run(llvm::StringRef, llvm::RecordKeeper const&) DAGISelEmitter.cpp:0:0

```

</details>

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


More information about the llvm-commits mailing list