[llvm] [RISCV][TTI] Refactor getCastInstrCost to exit early (PR #86619)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 11:47:20 PDT 2024


topperc wrote:

> Hi,
> 
> This patch is causing an assertion error when building builtins-riscv64-unknown-linux-gnu:
> 
> ```
> FAILED: CMakeFiles/clang_rt.builtins-riscv64.dir/comparedf2.c.o 
> /b/s/w/ir/x/w/llvm_build/./bin/clang --target=riscv64-unknown-linux-gnu --sysroot=/b/s/w/ir/x/w/cipd/focal -DVISIBILITY_HIDDEN  --target=riscv64-unknown-linux-gnu -O2 -g -DNDEBUG -fno-lto -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -DCOMPILER_RT_HAS_FLOAT16 -MD -MT CMakeFiles/clang_rt.builtins-riscv64.dir/comparedf2.c.o -MF CMakeFiles/clang_rt.builtins-riscv64.dir/comparedf2.c.o.d -o CMakeFiles/clang_rt.builtins-riscv64.dir/comparedf2.c.o -c /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/comparedf2.c
> clang: llvm/lib/Target/RISCV/RISCVSubtarget.h:184: unsigned int llvm::RISCVSubtarget::getELen() const: Assertion `hasVInstructions() && "Expected V extension"' failed.
> PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
> Stack dump:
> 0.	Program arguments: /b/s/w/ir/x/w/llvm_build/./bin/clang --target=riscv64-unknown-linux-gnu --sysroot=/b/s/w/ir/x/w/cipd/focal -DVISIBILITY_HIDDEN --target=riscv64-unknown-linux-gnu -O2 -g -DNDEBUG -fno-lto -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -DCOMPILER_RT_HAS_FLOAT16 -MD -MT CMakeFiles/clang_rt.builtins-riscv64.dir/comparedf2.c.o -MF CMakeFiles/clang_rt.builtins-riscv64.dir/comparedf2.c.o.d -o CMakeFiles/clang_rt.builtins-riscv64.dir/comparedf2.c.o -c /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/comparedf2.c
> 1.	<eof> parser at end of file
> 2.	Optimizer
> #0 0x0000558c74b4ae08 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/s/w/ir/x/w/llvm_build/./bin/clang+0x8948e08)
> clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
> Fuchsia clang version 19.0.0git (https://llvm.googlesource.com/llvm-project 817f453aa576286aaca0a6b0244e6ab08516b80c)
> Target: riscv64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /b/s/w/ir/x/w/llvm_build/bin
> clang: note: diagnostic msg: 
> ********************
> 
> PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> Preprocessed source(s) and associated run script(s) are located at:
> clang: note: diagnostic msg: /b/s/w/ir/x/w/llvm_build/clang-crashreports/comparedf2-7e2acc.c
> clang: note: diagnostic msg: /b/s/w/ir/x/w/llvm_build/clang-crashreports/comparedf2-7e2acc.sh
> clang: note: diagnostic msg: 
> 
> ********************
> ```
> 
> This issue still persist after your fix forward patch landed. Could you revert your changes and fix them and reland them? Failed build: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8752425016802502289/overview
> 
> Entire stdout from the build: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8752425016802502289/+/u/clang/build/stdout
> 
> Thanks.

I'll fix this in a few minutes

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


More information about the llvm-commits mailing list