<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 - [CodeGen] Failed to select store instruction with certain operands"
href="https://bugs.llvm.org/show_bug.cgi?id=50377">50377</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[CodeGen] Failed to select store instruction with certain operands
</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>All
</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: M68k
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>minyihh@uci.edu
</td>
</tr>
<tr>
<th>CC</th>
<td>glaubitz@physik.fu-berlin.de, llvm-bugs@lists.llvm.org, minyihh@uci.edu
</td>
</tr></table>
<p>
<div>
<pre>Here is the IR code to reproduce the problem:
```
@var = global [2 x i16] zeroinitializer
define void @foo() {
%1 = load volatile [2 x i16], [2 x i16]* @var
store volatile [2 x i16] %1, [2 x i16]* @var
ret void
}
```
With this command: `llc -mtriple=m68k input.ll`
It will give us the following error message:
```
LLVM ERROR: Cannot select: t11: ch = store<(volatile store 2 into @var + 2)>
t8, t7, t6, undef:i32
t7: i16,ch = load<(volatile dereferenceable load 2 from @var + 2)> t0, t6,
undef:i32
t6: i32 = add nuw t16, Constant:i32<2>
t16: i32 = M68kISD::WrapperPC TargetGlobalAddress:i32<[2 x i16]* @var> 0
t15: i32 = TargetGlobalAddress<[2 x i16]* @var> 0
t5: i32 = Constant<2>
t3: i32 = undef
t6: i32 = add nuw t16, Constant:i32<2>
t16: i32 = M68kISD::WrapperPC TargetGlobalAddress:i32<[2 x i16]* @var> 0
t15: i32 = TargetGlobalAddress<[2 x i16]* @var> 0
t5: i32 = Constant<2>
t3: i32 = undef
In function: foo
```
After some quick study, it seems like it fail to replace `t6` with one of the
supported addressing modes (operand). So my hand-waving guess is that there are
bugs in ISel regarding pc-relative addressing modes like PCI or PCD.</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>