[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:17:51 PDT 2025


llvm-ci wrote:

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

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
17.301 [703/16/3471] Building CXX object lib/Target/RISCV/MCTargetDesc/CMakeFiles/LLVMRISCVDesc.dir/RISCVMCObjectFileInfo.cpp.o
17.302 [702/16/3472] Building CXX object lib/Target/RISCV/Disassembler/CMakeFiles/LLVMRISCVDisassembler.dir/RISCVDisassembler.cpp.o
17.315 [702/15/3473] Linking CXX static library lib/libLLVMRISCVDesc.a
17.318 [699/17/3474] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVISelDAGToDAG.cpp.o
17.320 [699/16/3475] Linking CXX static library lib/libLLVMRISCVDisassembler.a
17.320 [699/15/3476] Linking CXX static library lib/libLLVMRISCVTargetMCA.a
17.320 [699/14/3477] Linking CXX static library lib/libLLVMRISCVAsmParser.a
17.375 [699/13/3478] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/GISel/RISCVInstructionSelector.cpp.o
17.557 [699/12/3479] Building AMDGPUGenAsmWriter.inc...
19.070 [699/11/3480] 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++ -DEXPENSIVE_CHECKS -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/llvm-clang-x86_64-expensive-checks-debian/build/lib/Target/AArch64 -I/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/Target/AArch64 -I/b/1/llvm-clang-x86_64-expensive-checks-debian/build/include -I/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/include -U_GLIBCXX_DEBUG -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-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
/b/1/llvm-clang-x86_64-expensive-checks-debian/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-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4417:14: note: previous definition is here
    if (auto Cost = getFP16BF16PromoteCost(
             ^
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13: error: no viable conversion from '(lambda at /b/1/llvm-clang-x86_64-expensive-checks-debian/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-clang-x86_64-expensive-checks-debian/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-clang-x86_64-expensive-checks-debian/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-clang-x86_64-expensive-checks-debian/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-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13), std::__invoke_result<(lambda at /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13) &, llvm::Type *>>::value' was not satisfied [with _Functor = (lambda at /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:4419:13), $1 = void]
        function(_Functor);
        ^
/b/1/llvm-clang-x86_64-expensive-checks-debian/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.
19.251 [699/10/3481] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
19.251 [699/9/3482] Building AMDGPUGenGlobalISel.inc...
19.891 [699/8/3483] Building AMDGPUGenDAGISel.inc...
20.143 [699/7/3484] Building AMDGPUGenInstrInfo.inc...
21.396 [699/6/3485] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
21.630 [699/5/3486] Building AMDGPUGenRegisterInfo.inc...
21.690 [699/4/3487] Building AMDGPUGenRegisterBank.inc...
22.221 [699/3/3488] Building X86GenAsmMatcher.inc...
23.471 [699/2/3489] Building CXX object lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetMachine.cpp.o
32.225 [699/1/3490] Building AMDGPUGenAsmMatcher.inc...
ninja: build stopped: subcommand failed.

```

</details>

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


More information about the llvm-commits mailing list