[llvm] [NFC][MI] Tidy Up RegState enum use (1/2) (PR #176091)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 15 07:49:38 PST 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `cross-project-tests-sie-ubuntu-dwarf5` running on `doug-worker-1b` while building `llvm` at step 5 "build-unified-tree".

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
0.045 [393/8/16] LLDB headers: stage LLDB headers in include directory
0.050 [392/8/17] Generating VCSRevision.h
0.058 [391/8/18] LLDB headers: stage LLDB headers in include directory
0.058 [390/8/19] LLDB headers: stage LLDB headers in include directory
0.059 [389/8/20] LLDB headers: stage LLDB headers in include directory
0.059 [388/8/21] LLDB headers: stage LLDB headers in include directory
0.059 [387/8/22] Generating VCSVersion.inc
0.061 [386/8/23] LLDB headers: stage LLDB headers in include directory
0.140 [385/8/24] Linking CXX executable bin/llvm-config
7.637 [384/8/25] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BreakFalseDeps.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BreakFalseDeps.cpp.o 
/opt/ccache/bin/g++ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/lib/CodeGen -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/lib/CodeGen -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BreakFalseDeps.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BreakFalseDeps.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BreakFalseDeps.cpp.o -c /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/lib/CodeGen/BreakFalseDeps.cpp
In file included from /usr/include/c++/11/cassert:44,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:34,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/TargetInstrInfo.h:26,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/lib/CodeGen/BreakFalseDeps.cpp:25:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h: In function ‘constexpr unsigned int llvm::getRegState(const llvm::MachineOperand&)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:112:21: error: call to non-‘constexpr’ function ‘bool llvm::MachineOperand::isReg() const’
  112 |   assert(RegOp.isReg() && "Not a register operand");
      |          ~~~~~~~~~~~^~
In file included from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:26,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineBasicBlock.h:22,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/LivePhysRegs.h:33,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/lib/CodeGen/BreakFalseDeps.cpp:21:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineOperand.h:331:8: note: ‘bool llvm::MachineOperand::isReg() const’ declared here
  331 |   bool isReg() const { return OpKind == MO_Register; }
      |        ^~~~~
7.922 [384/7/26] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BranchRelaxation.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BranchRelaxation.cpp.o 
/opt/ccache/bin/g++ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/lib/CodeGen -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/lib/CodeGen -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BranchRelaxation.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BranchRelaxation.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BranchRelaxation.cpp.o -c /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/lib/CodeGen/BranchRelaxation.cpp
In file included from /usr/include/c++/11/cassert:44,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:34,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/TargetInstrInfo.h:26,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/lib/CodeGen/BranchRelaxation.cpp:18:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h: In function ‘constexpr unsigned int llvm::getRegState(const llvm::MachineOperand&)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineInstrBuilder.h:112:21: error: call to non-‘constexpr’ function ‘bool llvm::MachineOperand::isReg() const’
  112 |   assert(RegOp.isReg() && "Not a register operand");
      |          ~~~~~~~~~~~^~
In file included from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineInstr.h:26,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineBasicBlock.h:22,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineFunction.h:26,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachinePassManager.h:26,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/BranchRelaxation.h:12,
                 from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/lib/CodeGen/BranchRelaxation.cpp:9:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include/llvm/CodeGen/MachineOperand.h:331:8: note: ‘bool llvm::MachineOperand::isReg() const’ declared here
  331 |   bool isReg() const { return OpKind == MO_Register; }
      |        ^~~~~
8.027 [384/6/27] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BasicBlockPathCloning.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BasicBlockPathCloning.cpp.o 

```

</details>

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


More information about the llvm-commits mailing list