[llvm-bugs] [Bug 46507] New: GlobalISel assertion failure on AArch64 compilation

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 29 17:24:53 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46507

            Bug ID: 46507
           Summary: GlobalISel assertion failure on AArch64 compilation
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: srhines at google.com
                CC: arnaud.degrandmaison at arm.com,
                    llvm-bugs at lists.llvm.org, smithp352 at googlemail.com,
                    Ties.Stuij at arm.com

>From https://github.com/android/ndk/issues/1289, we are seeing a crash with the
following code snippet:

$ /disk/llvm/build/bin/clang -cc1 -triple aarch64-none-linux-gnueabi -emit-obj
-x ir - <<EOF
%array = type [1 x {i8*, i32}]
define internal void @f(%array %arg) {
  %var = alloca %array
  store %array %arg, %array* %var
  ret void                       
}         
EOF
warning: overriding the module target triple with aarch64-none-linux-gnueabi
[-Woverride-module]
clang:
/disk/llvm/llvm-project/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp:295: bool
llvm::CallLowering::handleAssignments(llvm::CCState &,
SmallVectorImpl<llvm::CCValAssign> &, llvm::MachineIRBuilder &,
SmallVectorImpl<llvm::CallLowering::ArgInfo> &,
llvm::CallLowering::ValueHandler &) const: Assertion `VA.getValNo() == i &&
"Location doesn't correspond to current arg"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /disk/llvm/build/bin/clang -cc1 -triple
aarch64-none-linux-gnueabi -emit-obj -x ir - 
1.      Code generation
2.      Running pass 'Function Pass Manager' on module '<stdin>'.
3.      Running pass 'IRTranslator' on function '@f'
 #0 0x000000000412ea67 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/disk/llvm/build/bin/clang+0x412ea67)
 #1 0x000000000412ec09 PrintStackTraceSignalHandler(void*)
(/disk/llvm/build/bin/clang+0x412ec09)
 #2 0x000000000412d41b llvm::sys::RunSignalHandlers()
(/disk/llvm/build/bin/clang+0x412d41b)
 #3 0x000000000412f385 SignalHandler(int)
(/disk/llvm/build/bin/clang+0x412f385)
 #4 0x00007f49b56be110 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14110)
 #5 0x00007f49b5198761 raise
/build/glibc-M65Gwz/glibc-2.30/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #6 0x00007f49b518255b abort /build/glibc-M65Gwz/glibc-2.30/stdlib/abort.c:81:7
 #7 0x00007f49b518242f get_sysdep_segment_value
/build/glibc-M65Gwz/glibc-2.30/intl/loadmsgcat.c:509:8
 #8 0x00007f49b518242f _nl_load_domain
/build/glibc-M65Gwz/glibc-2.30/intl/loadmsgcat.c:970:34
 #9 0x00007f49b5191092 (/lib/x86_64-linux-gnu/libc.so.6+0x34092)
#10 0x0000000005218073 llvm::CallLowering::handleAssignments(llvm::CCState&,
llvm::SmallVectorImpl<llvm::CCValAssign>&, llvm::MachineIRBuilder&,
llvm::SmallVectorImpl<llvm::CallLowering::ArgInfo>&,
llvm::CallLowering::ValueHandler&) const (/disk/llvm/build/bin/clang+0x5218073)
#11 0x000000000521733d
llvm::CallLowering::handleAssignments(llvm::MachineIRBuilder&,
llvm::SmallVectorImpl<llvm::CallLowering::ArgInfo>&,
llvm::CallLowering::ValueHandler&) const (/disk/llvm/build/bin/clang+0x521733d)
#12 0x0000000001445ce4
llvm::AArch64CallLowering::lowerFormalArguments(llvm::MachineIRBuilder&,
llvm::Function const&, llvm::ArrayRef<llvm::ArrayRef<llvm::Register> >) const
(/disk/llvm/build/bin/clang+0x1445ce4)
#13 0x0000000005239959
llvm::IRTranslator::runOnMachineFunction(llvm::MachineFunction&)
(/disk/llvm/build/bin/clang+0x5239959)
#14 0x00000000030e1527
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/disk/llvm/build/bin/clang+0x30e1527)
#15 0x000000000368e34c llvm::FPPassManager::runOnFunction(llvm::Function&)
(/disk/llvm/build/bin/clang+0x368e34c)
#16 0x000000000368e775 llvm::FPPassManager::runOnModule(llvm::Module&)
(/disk/llvm/build/bin/clang+0x368e775)
#17 0x000000000368eef4 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
(/disk/llvm/build/bin/clang+0x368eef4)
#18 0x000000000368ea18 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/disk/llvm/build/bin/clang+0x368ea18)
#19 0x000000000368f491 llvm::legacy::PassManager::run(llvm::Module&)
(/disk/llvm/build/bin/clang+0x368f491)
#20 0x00000000044cee1c (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/disk/llvm/build/bin/clang+0x44cee1c)
#21 0x00000000044cadbb 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> >)
(/disk/llvm/build/bin/clang+0x44cadbb)
#22 0x00000000058107c7 clang::CodeGenAction::ExecuteAction()
(/disk/llvm/build/bin/clang+0x58107c7)
#23 0x0000000004de2c78 clang::FrontendAction::Execute()
(/disk/llvm/build/bin/clang+0x4de2c78)
#24 0x0000000004d730ed
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/disk/llvm/build/bin/clang+0x4d730ed)
#25 0x0000000004f81427
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/disk/llvm/build/bin/clang+0x4f81427)
#26 0x0000000001200e2e cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/disk/llvm/build/bin/clang+0x1200e2e)
#27 0x00000000011f49b2 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/disk/llvm/build/bin/clang+0x11f49b2)
#28 0x00000000011f3bfe main (/disk/llvm/build/bin/clang+0x11f3bfe)
#29 0x00007f49b5183e0b __libc_start_main
/build/glibc-M65Gwz/glibc-2.30/csu/../csu/libc-start.c:342:3
#30 0x00000000011f33aa _start (/disk/llvm/build/bin/clang+0x11f33aa)
Aborted

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200630/2da927b0/attachment.html>


More information about the llvm-bugs mailing list