<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - cannot select scalar_to_vector llvm.x86.mmx.punpckhbw"
href="https://llvm.org/bugs/show_bug.cgi?id=23246">23246</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>cannot select scalar_to_vector llvm.x86.mmx.punpckhbw
</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>Linux
</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: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nlewycky@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I think this broke between r234774 (known good) and r234879 (known bad).
Apologies for the odd testcase, this came out of delta and I couldn't make it
more sensible.
Testcase:
typedef long __m64 __attribute__((__vector_size__(8)));
typedef long __m128i __attribute__((__vector_size__(16)));
typedef char __v8qi __attribute__((__vector_size__(8)));
void consume(__m128i);
void test(__m64 __m1, __m64 __m2) {
__m64 C = __builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
__m64 q0;
__m128i trans_tmp_3 = {(long)q0, (long)C};
consume(trans_tmp_3);
}
$ clang -mavx b.cc -O2 -std=c++11
fatal error: error in backend: Cannot select: 0x2e8c290: v2i64 =
scalar_to_vector 0x2e8c7e0 [ORD=9] [ID=14]
0x2e8c7e0: x86mmx = llvm.x86.mmx.punpckhbw 0x2e8c6d0, 0x2e8c3a0, 0x2e8c5c0
[ORD=6] [ID=13]
0x2e8c6d0: i64 = TargetConstant<3941> [ID=3]
0x2e8c3a0: x86mmx = bitcast 0x2e8bf60 [ORD=3] [ID=11]
0x2e8bf60: i64,ch = CopyFromReg 0x2e1a2c0, 0x2e8be50 [ORD=1] [ID=9]
0x2e8be50: i64 = Register %vreg0 [ID=1]
0x2e8c5c0: x86mmx = bitcast 0x2e8c180 [ORD=5] [ID=12]
0x2e8c180: i64,ch = CopyFromReg 0x2e1a2c0, 0x2e8c070 [ORD=1] [ID=10]
0x2e8c070: i64 = Register %vreg1 [ID=2]
In function: _Z4testDv1_lS_
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
Target: x86_64-grtev4-linux-gnu</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>