Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang asserts "Attempting to emit S2_mask instruction but the Feature_HasV66 predicate(s) are not met" #109190

Closed
androm3da opened this issue Sep 18, 2024 · 3 comments
Assignees
Labels
clang Clang issues not falling into any other category invalid Resolved as invalid, i.e. not a bug release:cherry-pick-failed

Comments

@androm3da
Copy link
Member

Assertion:

fatal error: error in backend: Attempting to emit S2_mask instruction but the Feature_HasV66 predicate(s) are not met

 0.	Program arguments: /local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang --sysroot /local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/usr/-buildroot-linux-musl/sysroot -Wno-unused-command-line-argument -mcpu=hexagonv60 -std=gnu99 -Os -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-builtin-printf -Os -fcolor-diagnostics -c -o editors/awk.o /local/mnt/workspace/sidneym/ccache/tmp/awk.stdout.hu-sidneym-lv.1543331.wsPH6O.i
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'editors/awk.c'.
4.	Running pass 'Hexagon Assembly Printer' on function '@next_token'
#0 0x000055987f001ae7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x33dbae7)
#1 0x000055987efff84e llvm::sys::RunSignalHandlers() (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x33d984e)
#2 0x000055987ef84026 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) CrashRecoveryContext.cpp:0:0
#3 0x000055987ef83fcf llvm::CrashRecoveryContext::HandleExit(int) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x335dfcf)
#4 0x000055987effc977 llvm::sys::Process::Exit(int, bool) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x33d6977)
#5 0x000055987dff1102 (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x23cb102)
#6 0x000055987ef89a23 llvm::report_fatal_error(llvm::Twine const&, bool) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x3363a23)
#7 0x000055987ef898d6 (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x33638d6)
#8 0x000055987e1e11ca llvm::Hexagon_MC::verifyInstructionPredicates(unsigned int, llvm::FeatureBitset const&) HexagonMCTargetDesc.cpp:0:0
#9 0x000055987dffebee llvm::HexagonAsmPrinter::emitInstruction(llvm::MachineInstr const*) HexagonAsmPrinter.cpp:0:0
#10 0x000055987ff1170f llvm::AsmPrinter::emitFunctionBody() (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x42eb70f)
#11 0x000055987dfff100 llvm::HexagonAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) HexagonAsmPrinter.cpp:0:0
#12 0x000055987e5428ac llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x291c8ac)
#13 0x000055987eb48025 llvm::FPPassManager::runOnFunction(llvm::Function&) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x2f22025)
#14 0x000055987eb4fb01 llvm::FPPassManager::runOnModule(llvm::Module&) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x2f29b01)
#15 0x000055987eb48a26 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x2f22a26)
#16 0x000055987f7d74f1 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::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x3bb14f1)
#17 0x000055987f7fd907 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x3bd7907)
#18 0x0000559881554ec7 clang::ParseAST(clang::Sema&, bool, bool) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x592eec7)
#19 0x000055987fc88cd0 clang::FrontendAction::Execute() (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x4062cd0)
#20 0x000055987fc037df clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x3fdd7df)
#21 0x000055987fd6845a clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x414245a)
#22 0x000055987dff0c9b cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x23cac9b)
#23 0x000055987dfed461 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#24 0x000055987fa30289 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const::$_1>(long) Job.cpp:0:0
#25 0x000055987ef83f6b llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x335df6b)
#26 0x000055987fa2fc50 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x3e09c50)
#27 0x000055987f9eb1ea clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x3dc51ea)
#28 0x000055987f9eb4de clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&, bool) const (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x3dc54de)
#29 0x000055987fa0bf80 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x3de5f80)
#30 0x000055987dfec88b clang_main(int, char**, llvm::ToolContext const&) (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x23c688b)
#31 0x000055987dffc6f7 main (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x23d66f7)
#32 0x00007f2f76514d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#33 0x00007f2f76514e40 call_init ./csu/../csu/libc-start.c:128:20
#34 0x00007f2f76514e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#35 0x000055987dfeade5 _start (/local/mnt/workspace/tmp/X2/QEMU_H2_LINUX/BUILDROOT/pub/host/opt/ext-toolchain/bin/hexagon-unknown-linux-musl-clang+0x23c4de5)
hexagon-unknown-linux-musl-clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 20.0.0git (
https://github.com/llvm/llvm-project
ca7368d839c1b067bbb30b4c91dc4d5f79d30bda)

This issue was fixed by cc90830

@androm3da androm3da self-assigned this Sep 18, 2024
@androm3da androm3da added this to the LLVM 19.X Release milestone Sep 18, 2024
@github-actions github-actions bot added the clang Clang issues not falling into any other category label Sep 18, 2024
@androm3da
Copy link
Member Author

/cherry-pick cc90830

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 18, 2024

Failed to cherry-pick: cc90830

https://github.com/llvm/llvm-project/actions/runs/10929633976

Please manually backport the fix and push it to your github fork. Once this is done, please create a pull request

@androm3da androm3da added the invalid Resolved as invalid, i.e. not a bug label Sep 18, 2024
@androm3da
Copy link
Member Author

Sorry, my mistake. This fix is only required after #92365 landed, which is absent from release 19.x.

Please disregard.

@EugeneZelenko EugeneZelenko closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category invalid Resolved as invalid, i.e. not a bug release:cherry-pick-failed
Projects
Development

No branches or pull requests

3 participants