<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 - Crash in TwoAddressInstructions"
href="https://bugs.llvm.org/show_bug.cgi?id=34675">34675</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash in TwoAddressInstructions
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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>davide@freebsd.org
</td>
</tr>
<tr>
<th>CC</th>
<td>dmitry.mikulin@sony.com, llvm-bugs@lists.llvm.org, simon.f.whittaker@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>$ cat rel.ll
target triple = "aarch64--linux-gnu"
%class.b = type { [0 x %"struct.b::B"] }
%"struct.b::B" = type { i32 }
define void @_ZN1b1jEv(%class.b* %this) local_unnamed_addr #0 align 2 {
%a.sroa.0.0..sroa_idx = getelementptr inbounds %class.b, %class.b* %this, i64
0, i32 0, i64 0, i32 0
%a.sroa.0.0.copyload = load i32, i32* %a.sroa.0.0..sroa_idx, align 4
%call = tail call i32 @_ZN1b1eEv(%class.b* %this)
%conv = sext i32 %a.sroa.0.0.copyload to i64
%patatino = inttoptr i64 %conv to i8*
tail call void @llvm.memset.p0i8.i64(i8* %patatino, i8 0, i64 16, i32 4, i1
false)
%meh = inttoptr i64 %conv to i64*
%bf.load = load i64, i64* %meh, align 4
%bf.clear = and i64 %bf.load, -17592186044416
%bf.set = or i64 %bf.clear, 86
store i64 %bf.set, i64* %meh, align 4
ret void
}
declare i32 @_ZN1b1eEv(%class.b*) local_unnamed_addr #1
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i32, i1)
#2
$ ./llc rel.ll
llc: ../lib/CodeGen/TwoAddressInstructionPass.cpp:1244: bool
{anonymous}::TwoAddressInstructionPass::tryInstructionTransform(llvm::MachineBasicBlock::iterator&,
llvm::MachineBasicBlock::iterator&, unsigned int, unsigned int, unsigned int,
bool): Assertion `TargetRegisterInfo::isVirtualRegister(regB) && "cannot make
instruction into two-address form"' failed.</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>