[llvm] [AArch64] Generalize costing for FP16 instructions (PR #150033)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 8 06:24:34 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `llvm` at step 5 "build-unified-tree".

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
22.181 [2635/15/4876] Linking CXX static library lib/libLLVMPowerPCCodeGen.a
22.183 [2634/15/4877] Linking CXX static library lib/libLLVMExegesisMips.a
22.185 [2634/14/4878] Linking CXX static library lib/libLLVMExegesisPowerPC.a
22.187 [2634/13/4879] Linking CXX static library lib/libLLVMARMCodeGen.a
22.188 [2634/12/4880] Linking CXX static library lib/libLLVMRISCVCodeGen.a
22.189 [2633/12/4881] Linking CXX static library lib/libLLVMHexagonCodeGen.a
22.193 [2633/11/4882] Linking CXX static library lib/libLLVMExegesisRISCV.a
22.202 [2633/10/4883] Linking CXX static library lib/libLLVMX86CodeGen.a
22.206 [2632/10/4884] Linking CXX static library lib/libLLVMExegesisX86.a
23.025 [2632/9/4885] Building CXX object lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o
FAILED: lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/clang++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_EXPORTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/llvm-x86_64-debian-dylib/build/lib/Target/AArch64 -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64 -I/b/1/llvm-x86_64-debian-dylib/build/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include -fPIC -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 -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fvisibility=hidden  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o -MF lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o.d -o lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4420:31: error: redefinition of 'Cost' with a different type: 'llvm::InstructionCost' vs 'auto'
              InstructionCost Cost =
                              ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4417:14: note: previous definition is here
    if (auto Cost = getFP16BF16PromoteCost(
             ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13: error: no viable conversion from '(lambda at /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13)' to 'std::function<InstructionCost (Type *)>'
            [&](Type *PromotedTy) {
            ^~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:337:7: note: candidate constructor not viable: no known conversion from '(lambda at /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13)' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
      function(nullptr_t) noexcept
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:348:7: note: candidate constructor not viable: no known conversion from '(lambda at /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13)' to 'const std::function<llvm::InstructionCost (llvm::Type *)> &' for 1st argument
      function(const function& __x);
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:357:7: note: candidate constructor not viable: no known conversion from '(lambda at /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13)' to 'std::function<llvm::InstructionCost (llvm::Type *)> &&' for 1st argument
      function(function&& __x) noexcept : _Function_base()
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:381:2: note: candidate template ignored: requirement '_Callable<(lambda at /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13), std::__invoke_result<(lambda at /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13) &, llvm::Type *>>::value' was not satisfied [with _Functor = (lambda at /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13), $1 = void]
        function(_Functor);
        ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:3996:44: note: passing argument to parameter 'InstCost' here
    std::function<InstructionCost(Type *)> InstCost) const {
                                           ^
2 errors generated.
23.733 [2632/8/4886] Building AMDGPUGenGlobalISel.inc...
23.779 [2632/7/4887] Building AMDGPUGenDAGISel.inc...
23.924 [2632/6/4888] Building AMDGPUGenAsmMatcher.inc...
24.709 [2632/5/4889] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
25.280 [2632/4/4890] Building AMDGPUGenRegisterBank.inc...
25.627 [2632/3/4891] Building AMDGPUGenInstrInfo.inc...
26.963 [2632/2/4892] Building AMDGPUGenRegisterInfo.inc...
27.401 [2632/1/4893] Building CXX object lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetMachine.cpp.o
ninja: build stopped: subcommand failed.

```

</details>

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


More information about the llvm-commits mailing list