<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [AArch64] LLVM 13 regression: Crash in selectCopy when using x12-x15 as input for inline asm"
href="https://bugs.llvm.org/show_bug.cgi?id=51772">51772</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[AArch64] LLVM 13 regression: Crash in selectCopy when using x12-x15 as input for inline asm
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: AArch64
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>amanieu@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>arnaud.degrandmaison@arm.com, llvm-bugs@lists.llvm.org, smithp352@googlemail.com, Ties.Stuij@arm.com
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>