<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] missed opportunity to use 'tstbit' instruction"
href="https://bugs.llvm.org/show_bug.cgi?id=43194">43194</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[Hexagon] missed opportunity to use 'tstbit' instruction
</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>define i32 @is_bit_clear(i32 %x) {
%sh = lshr i32 %x, 10
%a = and i32 %sh, 1
%r = xor i32 %a, 1
ret i32 %r
}
$ llc -mtriple=hexagon-- bitclear.ll -o -
is_bit_clear:
{
r0 = and(r0,##1024)
}
{
r0 = cmp.eq(r0,#0)
jumpr r31
}
<a href="https://godbolt.org/z/Zht4_4">https://godbolt.org/z/Zht4_4</a>
See also discussion here:
<a href="https://reviews.llvm.org/D66687">https://reviews.llvm.org/D66687</a></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>