[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 05:48:21 PDT 2026


llvm-ci wrote:

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

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

<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)
...
[43/69] Linking CXX executable bin/OrcV2CBindingsLazy
[44/69] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
[45/69] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
[46/69] Linking CXX executable unittests/Target/TargetMachineCTests
[47/69] Linking CXX executable unittests/Transforms/IPO/IPOTests
[48/69] Linking CXX executable bin/LLJITWithRemoteDebugging
[49/69] Linking CXX executable unittests/Target/AArch64/AArch64Tests
[50/69] Linking CXX executable unittests/Transforms/Instrumentation/InstrumentationTests
[51/69] Linking CXX executable unittests/Transforms/Coroutines/CoroTests
[52/69] 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_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_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-aarch64-quick/stage1/unittests/CodeGen -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/unittests/CodeGen -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-aarch64-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-aarch64-quick/stage1/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/tcwg-buildbot/worker/clang-aarch64-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-aarch64-quick/llvm/llvm/unittests/CodeGen/RematerializerTest.cpp
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/unittests/CodeGen/RematerializerTest.cpp:96:5: error: use of undeclared identifier 'LLVMInitializeAMDGPUTargetInfo'; did you mean 'LLVMInitializeAArch64TargetInfo'?
   96 |     LLVMInitializeAMDGPUTargetInfo();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     LLVMInitializeAArch64TargetInfo
/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/include/llvm/Config/Targets.def:26:1: note: 'LLVMInitializeAArch64TargetInfo' declared here
   26 | LLVM_TARGET(AArch64)
      | ^
/home/tcwg-buildbot/worker/clang-aarch64-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>:54:1: note: expanded from here
   54 | LLVMInitializeAArch64TargetInfo
      | ^
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/unittests/CodeGen/RematerializerTest.cpp:97:5: error: use of undeclared identifier 'LLVMInitializeAMDGPUTarget'; did you mean 'LLVMInitializeAArch64Target'?
   97 |     LLVMInitializeAMDGPUTarget();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |     LLVMInitializeAArch64Target
/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/include/llvm/Config/Targets.def:26:1: note: 'LLVMInitializeAArch64Target' declared here
   26 | LLVM_TARGET(AArch64)
      | ^
/home/tcwg-buildbot/worker/clang-aarch64-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>:56:1: note: expanded from here
   56 | LLVMInitializeAArch64Target
      | ^
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/unittests/CodeGen/RematerializerTest.cpp:98:5: error: use of undeclared identifier 'LLVMInitializeAMDGPUTargetMC'; did you mean 'LLVMInitializeAArch64TargetMC'?
   98 |     LLVMInitializeAMDGPUTargetMC();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     LLVMInitializeAArch64TargetMC
/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/include/llvm/Config/Targets.def:26:1: note: 'LLVMInitializeAArch64TargetMC' declared here
   26 | LLVM_TARGET(AArch64)
      | ^
/home/tcwg-buildbot/worker/clang-aarch64-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>:58:1: note: expanded from here

```

</details>

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


More information about the llvm-commits mailing list