https://llvm.org/bugs/show_bug.cgi?id=31840
Bug ID: 31840 Summary: Assertion `Reg < Regs.size() && "Mismatch in # registers expected"' failed. Product: clang Version: 4.0 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: b...@linaro.org CC: llvm-bugs@lists.llvm.org Classification: Unclassified Building the Linux kernel for aarch64 (with some patches to make it possible, android-hikey-linaro-4.9-clang branch of git://android-git.linaro.org/kernel/hikey-clang.git) with AES crypto support enabled crashes clang (4.0 branch, svn rev. 293332) clang-4.0: /home/bero/abf/llvm/BUILD/llvm-4.0.0.src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:831: void llvm::RegsForValue::AddInlineAsmOperands(unsigned int, bool, unsigned int, const llvm::SDLoc &, llvm::SelectionDAG &, std::vector<SDValue> &) const: Assertion `Reg < Regs.size() && "Mismatch in # registers expected"' failed. #0 0x0000003f82cbe460 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/lib64/libLLVMSupport.so.4.0+0x3f82cbe460) #1 0x0000003f82cbd0f8 llvm::sys::RunSignalHandlers() (/usr/lib64/libLLVMSupport.so.4.0+0x3f82cbd0f8) #2 0x0000003f82cbe93a (/usr/lib64/libLLVMSupport.so.4.0+0x3f82cbe93a) #3 0x0000003d6380ef00 __restore_rt (/lib64/libpthread.so.0+0x3d6380ef00) #4 0x0000003d6342ef26 __GI_raise (/lib64/libc.so.6+0x3d6342ef26) #5 0x0000003d6342fe32 __GI_abort (/lib64/libc.so.6+0x3d6342fe32) #6 0x0000003d6342958a __GI___assert_fail (/lib64/libc.so.6+0x3d6342958a) #7 0x0000003d634295ce __GI___assert_perror_fail (/lib64/libc.so.6+0x3d634295ce) #8 0x0000003f91b2e9a9 llvm::RegsForValue::AddInlineAsmOperands(unsigned int, bool, unsigned int, llvm::SDLoc const&, llvm::SelectionDAG&, std::vector<llvm::SDValue, std::allocator<llvm::SDValue> >&) const (/usr/lib64/libLLVMSelectionDAG.so.4.0+0x3f91b2e9a9) #9 0x0000003f91b426cf llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite) (/usr/lib64/libLLVMSelectionDAG.so.4.0+0x3f91b426cf) #10 0x0000003f91b36687 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) (/usr/lib64/libLLVMSelectionDAG.so.4.0+0x3f91b36687) #11 0x0000003f91b2f148 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (/usr/lib64/libLLVMSelectionDAG.so.4.0+0x3f91b2f148) #12 0x0000003f91b96790 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, bool&) (/usr/lib64/libLLVMSelectionDAG.so.4.0+0x3f91b96790) #13 0x0000003f91b95958 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/lib64/libLLVMSelectionDAG.so.4.0+0x3f91b95958) #14 0x0000003f91b93354 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/lib64/libLLVMSelectionDAG.so.4.0+0x3f91b93354) #15 0x0000003f8c575b65 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib64/libLLVMCodeGen.so.4.0+0x3f8c575b65) #16 0x0000003f82f4a89b llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib64/libLLVMCore.so.4.0+0x3f82f4a89b) #17 0x0000003f82f4aa64 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib64/libLLVMCore.so.4.0+0x3f82f4aa64) #18 0x0000003f82f4ad4c llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib64/libLLVMCore.so.4.0+0x3f82f4ad4c) #19 0x0000003f9507f121 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/lib64/libclangCodeGen.so.4.0+0x3f9507f121) #20 0x0000003f951f02be (/usr/lib64/libclangCodeGen.so.4.0+0x3f951f02be) #21 0x0000003f8f22cdd1 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib64/libclangParse.so.4.0+0x3f8f22cdd1) #22 0x0000003f951ef445 clang::CodeGenAction::ExecuteAction() (/usr/lib64/libclangCodeGen.so.4.0+0x3f951ef445) #23 0x0000003f912a42d5 clang::FrontendAction::Execute() (/usr/lib64/libclangFrontend.so.4.0+0x3f912a42d5) #24 0x0000003f9127386e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib64/libclangFrontend.so.4.0+0x3f9127386e) #25 0x0000003f93e05ba7 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib64/libclangFrontendTool.so.4.0+0x3f93e05ba7) #26 0x0000000000410397 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-4.0+0x410397) #27 0x000000000040e796 main (/usr/bin/clang-4.0+0x40e796) #28 0x0000003d63420dbe __libc_start_main (/lib64/libc.so.6+0x3d63420dbe) #29 0x000000000040c8ca _start (/usr/bin/clang-4.0+0x40c8ca) Stack dump: 0. Program arguments: /usr/bin/clang-4.0 -cc1 -triple aarch64--linux-gnu -S -disable-free -main-file-name aes-ce-cipher.c -mrelocation-model static -meabi gnu -mthread-model posix -mllvm -warn-stack-size=2048 -mdisable-fp-elim -relaxed-aliasing -mdisable-tail-calls -fmath-errno -masm-verbose -no-integrated-as -mconstructor-aliases -fuse-init-array -target-cpu generic -target-feature -fp-armv8 -target-feature -crypto -target-feature -neon -target-abi aapcs -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/bero/repos/linux/arch/arm64/crypto/aes-ce-cipher.gcno -nostdsysteminc -nobuiltininc -resource-dir /usr/bin/../lib64/clang/4.0.0 -dependency-file arch/arm64/crypto/.aes-ce-cipher.o.d -MT arch/arm64/crypto/aes-ce-cipher.o -sys-header-deps -isystem /usr/bin/../lib64/clang/4.0.0/include -include ./include/linux/kconfig.h -I ./arch/arm64/include -I ./arch/arm64/include/generated/uapi -I ./arch/arm64/include/generated -I ./include -I ./arch/arm64/include/uapi -I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D CONFIG_AS_LSE=1 -D KBUILD_BASENAME="aes_ce_cipher" -D KBUILD_MODNAME="aes_ce_cipher" -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-asm-operand-widths -Wno-initializer-overrides -Wno-tautological-compare -Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-unknown-warning-option -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -std=gnu89 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/bero/repos/linux -ferror-limit 19 -fmessage-length 273 -fwrapv -fallow-half-arguments-and-returns -fno-builtin -fno-signed-char -fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/aes-ce-cipher-9b0d72.s -x c arch/arm64/crypto/aes-ce-cipher.c 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'arch/arm64/crypto/aes-ce-cipher.c'. 4. Running pass 'AArch64 Instruction Selection' on function '@ce_aes_expandkey' clang-4.0: error: unable to execute command: Aborted (core dumped) clang-4.0: error: clang frontend command failed due to signal (use -v to see invocation) clang version 4.0.0 (branches/release_40) Target: aarch64--linux-gnu Thread model: posix InstalledDir: /usr/bin clang-4.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-4.0: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-4.0: note: diagnostic msg: /tmp/aes-ce-cipher-79feb9.c clang-4.0: note: diagnostic msg: /tmp/aes-ce-cipher-79feb9.sh clang-4.0: note: diagnostic msg: ******************** make[1]: *** [scripts/Makefile.build:308: arch/arm64/crypto/aes-ce-cipher.o] Error 254 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs