[llvm] [CodeGen] Refactor rematerializer unit tests to reduce boilerplate (NFC) (PR #197575)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 06:01:02 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `llvm` at step 5 "ninja check 1".

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

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

```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[53/70] Linking CXX executable unittests/ExecutionEngine/Orc/OrcJITTests
[54/70] Linking CXX executable bin/Kaleidoscope-Ch7
[55/70] Linking CXX executable unittests/IR/IRTests
[56/70] Linking CXX executable unittests/Passes/Plugins/PluginsTests
[57/70] Linking CXX executable unittests/Passes/PassBuilderBindings/PassesBindingsTests
[58/70] Linking CXX executable bin/Kaleidoscope-Ch6
[59/70] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
[60/70] Linking CXX executable unittests/Analysis/AnalysisTests
[61/70] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
[62/70] Building CXX object unittests/CodeGen/CMakeFiles/CodeGenTests.dir/RematerializerTest.cpp.o
FAILED: unittests/CodeGen/CMakeFiles/CodeGenTests.dir/RematerializerTest.cpp.o 
/usr/local/bin/c++ -DLLVM_BUILD_STATIC -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/unittests/CodeGen -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/unittests/CodeGen -I/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/third-party/unittest/googlemock/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 -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Xclang -fno-pch-timestamp -O3 -DNDEBUG -std=c++17 -UNDEBUG -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -Wno-suggest-override -Winvalid-pch -Xclang -include-pch -Xclang /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/cmake_pch.hxx -MD -MT unittests/CodeGen/CMakeFiles/CodeGenTests.dir/RematerializerTest.cpp.o -MF unittests/CodeGen/CMakeFiles/CodeGenTests.dir/RematerializerTest.cpp.o.d -o unittests/CodeGen/CMakeFiles/CodeGenTests.dir/RematerializerTest.cpp.o -c /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/unittests/CodeGen/RematerializerTest.cpp
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/unittests/CodeGen/RematerializerTest.cpp:96:5: error: use of undeclared identifier 'LLVMInitializeAMDGPUTargetInfo'; did you mean 'LLVMInitializeARMTargetInfo'?
   96 |     LLVMInitializeAMDGPUTargetInfo();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     LLVMInitializeARMTargetInfo
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/include/llvm/Config/Targets.def:26:1: note: 'LLVMInitializeARMTargetInfo' declared here
   26 | LLVM_TARGET(ARM)
      | ^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/include/llvm/Support/TargetSelect.h:24:17: note: expanded from macro 'LLVM_TARGET'
   24 |   LLVM_ABI void LLVMInitialize##TargetName##TargetInfo();
      |                 ^
<scratch space>:50:1: note: expanded from here
   50 | LLVMInitializeARMTargetInfo
      | ^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/unittests/CodeGen/RematerializerTest.cpp:97:5: error: use of undeclared identifier 'LLVMInitializeAMDGPUTarget'; did you mean 'LLVMInitializeARMTarget'?
   97 |     LLVMInitializeAMDGPUTarget();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |     LLVMInitializeARMTarget
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/include/llvm/Config/Targets.def:26:1: note: 'LLVMInitializeARMTarget' declared here
   26 | LLVM_TARGET(ARM)
      | ^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/include/llvm/Support/TargetSelect.h:28:17: note: expanded from macro 'LLVM_TARGET'
   28 |   LLVM_ABI void LLVMInitialize##TargetName##Target();
      |                 ^
<scratch space>:52:1: note: expanded from here
   52 | LLVMInitializeARMTarget
      | ^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/unittests/CodeGen/RematerializerTest.cpp:98:5: error: use of undeclared identifier 'LLVMInitializeAMDGPUTargetMC'; did you mean 'LLVMInitializeARMTargetMC'?
   98 |     LLVMInitializeAMDGPUTargetMC();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     LLVMInitializeARMTargetMC
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/include/llvm/Config/Targets.def:26:1: note: 'LLVMInitializeARMTargetMC' declared here
   26 | LLVM_TARGET(ARM)
      | ^
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/include/llvm/Support/TargetSelect.h:33:17: note: expanded from macro 'LLVM_TARGET'
   33 |   LLVM_ABI void LLVMInitialize##TargetName##TargetMC();
      |                 ^
<scratch space>:54:1: note: expanded from here

```

</details>

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


More information about the llvm-commits mailing list