[llvm-bugs] [Bug 51772] New: [AArch64] LLVM 13 regression: Crash in selectCopy when using x12-x15 as input for inline asm

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 6 16:12:47 PDT 2021


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

            Bug ID: 51772
           Summary: [AArch64] LLVM 13 regression: Crash in selectCopy when
                    using x12-x15 as input for inline asm
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: amanieu at gmail.com
                CC: arnaud.degrandmaison at arm.com,
                    llvm-bugs at lists.llvm.org, smithp352 at googlemail.com,
                    Ties.Stuij at arm.com

Input IR:

define void @foo() {
  call void asm sideeffect "", "{x15}"(i32 0)
  ret void
}

This crash only happens on -O0 and only if the register is x12, x13, x14 or
x15. Works correctly in LLVM 12.

Stack dump:
0.      Program arguments: /opt/compiler-explorer/clang-trunk/bin/llc -o
/app/output.s -x86-asm-syntax=intel -mtriple=aarch64 -O0 <source>
1.      Running pass 'Function Pass Manager' on module '<source>'.
2.      Running pass 'InstructionSelect' on function '@foo'
 #0 0x000055fc4b6d5c3f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x000055fc4b6d34ed SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f056708d3c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #3 0x000055fc4976a6e3 selectCopy(llvm::MachineInstr&, llvm::TargetInstrInfo
const&, llvm::MachineRegisterInfo&, llvm::TargetRegisterInfo const&,
llvm::RegisterBankInfo const&) AArch64InstructionSelector.cpp:0:0
 #4 0x000055fc49773c09 (anonymous
namespace)::AArch64InstructionSelector::select(llvm::MachineInstr&)
AArch64InstructionSelector.cpp:0:0
 #5 0x000055fc4bcdde57
llvm::InstructionSelect::runOnMachineFunction(llvm::MachineFunction&)
(.part.87) InstructionSelect.cpp:0:0
 #6 0x000055fc4ab36da8
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/opt/compiler-explorer/clang-trunk/bin/llc+0x1f36da8)
 #7 0x000055fc4af5dad9 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/opt/compiler-explorer/clang-trunk/bin/llc+0x235dad9)
 #8 0x000055fc4af5dd71 llvm::FPPassManager::runOnModule(llvm::Module&)
(/opt/compiler-explorer/clang-trunk/bin/llc+0x235dd71)
 #9 0x000055fc4af5efe7 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/opt/compiler-explorer/clang-trunk/bin/llc+0x235efe7)
#10 0x000055fc494d71e1 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#11 0x000055fc494034b6 main
(/opt/compiler-explorer/clang-trunk/bin/llc+0x8034b6)
#12 0x00007f0566b3d0b3 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x270b3)
#13 0x000055fc494cef5a _start
(/opt/compiler-explorer/clang-trunk/bin/llc+0x8cef5a)
Compiler returned: 139

-- 
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/20210906/63c9f8a6/attachment.html>


More information about the llvm-bugs mailing list