-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed as not planned
Closed as not planned
Copy link
Labels
backend:RISC-VcrashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]duplicateResolved as duplicateResolved as duplicate
Description
The code:
#include <riscv_vector.h>
int ext(int x);
__attribute__((target("arch=+zvl512b")))
int foo(int x) {
return ext(x);
}(https://godbolt.org/z/Tbhh7vnd6) compiled with -march=rv64gcv gives this error:
fatal error: error in backend: riscv-v-vector-bits-min specified is lower than the Zvl*b limitation
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: /opt/compiler-explorer/clang-trunk/bin/clang -g -o /app/output.s -fno-verbose-asm -S -target riscv64-unknown-linux-gnu -march=rv64gc -mabi=lp64d --gcc-toolchain=/opt/compiler-explorer/riscv64/gcc-8.2.0/riscv64-unknown-linux-gnu --sysroot=/opt/compiler-explorer/riscv64/gcc-8.2.0/riscv64-unknown-linux-gnu/riscv64-unknown-linux-gnu/sysroot -fcolor-diagnostics -fno-crash-diagnostics -march=rv64gcv -O3 <source>
1. <eof> parser at end of file
2. Optimizer
3. Running pass "function<eager-inv>(ee-instrument<>,lower-expect,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>,callsite-splitting)" on module "<source>"
4. Running pass "simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>" on function "foo"
#0 0x000000000396c6d8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/clang+0x396c6d8)
#1 0x000000000396a814 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-trunk/bin/clang+0x396a814)
#2 0x00000000038bb7d3 llvm::CrashRecoveryContext::HandleExit(int) (/opt/compiler-explorer/clang-trunk/bin/clang+0x38bb7d3)
#3 0x000000000396227e llvm::sys::Process::Exit(int, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+0x396227e)
#4 0x0000000000ce9a1b LLVMErrorHandler(void*, char const*, bool) cc1_main.cpp:0:0
#5 0x00000000038c5823 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+0x38c5823)
#6 0x00000000038c5988 (/opt/compiler-explorer/clang-trunk/bin/clang+0x38c5988)
#7 0x0000000001f9e757 (/opt/compiler-explorer/clang-trunk/bin/clang+0x1f9e757)
#8 0x00000000020acda0 llvm::RISCVTargetLowering::RISCVTargetLowering(llvm::TargetMachine const&, llvm::RISCVSubtarget const&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x20acda0)
#9 0x0000000001f9e5d0 llvm::RISCVSubtarget::RISCVSubtarget(llvm::Triple const&, llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::StringRef, unsigned int, unsigned int, llvm::TargetMachine const&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x1f9e5d0)
#10 0x0000000001fa7839 llvm::RISCVTargetMachine::getSubtargetImpl(llvm::Function const&) const (/opt/compiler-explorer/clang-trunk/bin/clang+0x1fa7839)
#11 0x0000000001fa161c llvm::RISCVTargetMachine::getTargetTransformInfo(llvm::Function const&) const (/opt/compiler-explorer/clang-trunk/bin/clang+0x1fa161c)
#12 0x0000000005054720 std::_Function_handler<llvm::TargetTransformInfo (llvm::Function const&), llvm::TargetMachine::getTargetIRAnalysis() const::'lambda'(llvm::Function const&)>::_M_invoke(std::_Any_data const&, llvm::Function const&) TargetMachine.cpp:0:0
#13 0x0000000002b2240f llvm::TargetIRAnalysis::run(llvm::Function const&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x2b2240f)
#14 0x0000000004f36a21 llvm::detail::AnalysisPassModel<llvm::Function, llvm::TargetIRAnalysis, llvm::AnalysisManager<llvm::Function>::Invalidator>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x4f36a21)
#15 0x00000000033363aa llvm::AnalysisManager<llvm::Function>::getResultImpl(llvm::AnalysisKey*, llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x33363aa)
#16 0x000000000385dff9 llvm::SimplifyCFGPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x385dff9)
#17 0x00000000018d93de llvm::detail::PassModel<llvm::Function, llvm::SimplifyCFGPass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x18d93de)
#18 0x000000000333b1e7 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x333b1e7)
#19 0x00000000010a357e llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x10a357e)
#20 0x000000000333b9c6 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x333b9c6)
#21 0x00000000010a2cae llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x10a2cae)
#22 0x000000000333d9a7 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x333d9a7)
#23 0x0000000003c0379b (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) BackendUtil.cpp:0:0
#24 0x0000000003c06827 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/opt/compiler-explorer/clang-trunk/bin/clang+0x3c06827)
#25 0x00000000042b28a3 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x42b28a3)
#26 0x00000000062a678c clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-trunk/bin/clang+0x62a678c)
#27 0x00000000042b2fa5 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-trunk/bin/clang+0x42b2fa5)
#28 0x000000000457a7d1 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-trunk/bin/clang+0x457a7d1)
#29 0x00000000044fa8bb clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x44fa8bb)
#30 0x000000000465ed83 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-trunk/bin/clang+0x465ed83)
#31 0x0000000000cebbbc cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-trunk/bin/clang+0xcebbbc)
#32 0x0000000000ce463d ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#33 0x00000000042fadc9 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#34 0x00000000038bb6d3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-trunk/bin/clang+0x38bb6d3)
#35 0x00000000042fafe9 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#36 0x00000000042c297d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+0x42c297d)
#37 0x00000000042c397d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-trunk/bin/clang+0x42c397d)
#38 0x00000000042ccf6c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-trunk/bin/clang+0x42ccf6c)
#39 0x0000000000ce8921 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-trunk/bin/clang+0xce8921)
#40 0x0000000000bba334 main (/opt/compiler-explorer/clang-trunk/bin/clang+0xbba334)
#41 0x000071feb0829d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#42 0x000071feb0829e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#43 0x0000000000ce40de _start (/opt/compiler-explorer/clang-trunk/bin/clang+0xce40de)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Compiler returned: 70
Metadata
Metadata
Assignees
Labels
backend:RISC-VcrashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]duplicateResolved as duplicateResolved as duplicate