<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 - [Hexagon] crash: failed to select v2i16 shift op"
href="https://bugs.llvm.org/show_bug.cgi?id=39983">39983</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[Hexagon] crash: failed to select v2i16 shift op
</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: Hexagon
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>spatel+llvm@rotateright.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I'm working on a generic DAGCombiner transform and hit this Hexagon backend
crash which looks to be an independent bug. This test is reduced from
test/CodeGen/Hexagon/vect/vect-vaslw.ll:
target datalayout =
"e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-v64:64:64-v32:32:32-a0:0-n16:32"
target triple = "hexagon-unknown-linux-gnu"
define <2 x i16> @foo(<2 x i32>* nocapture %v) nounwind {
%vec = load <2 x i32>, <2 x i32>* %v, align 2
%trunc = trunc <2 x i32> %vec to <2 x i16>
%r = lshr <2 x i16> %trunc, <i16 4, i16 4>
ret <2 x i16> %r
}
$ llc -o - vect-vaslw.ll
.text
.file "vect-vaslw.ll"
LLVM ERROR: Cannot select: t14: v2i16 = HexagonISD::VLSR t6, Constant:i32<4>
t6: v2i16 = truncate t16
t16: v2i32 = bitcast t23
t23: i64 = or t22, t29
t22: i64 = shl t48, Constant:i32<32>
t48: i64 = any_extend t43
t43: i32 = or t42, t39
t42: i32 = shl t41, Constant:i32<16>
t41: i32,ch = load<(load 2 from %ir.v + 6), zext from i16> t0,
t47, undef:i32
t47: i32 = add t2, Constant:i32<6></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>