<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 - [X86] Bug in shuffle-to-zero-extend transformation"
href="https://bugs.llvm.org/show_bug.cgi?id=34577">34577</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[X86] Bug in shuffle-to-zero-extend transformation
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>ayman.musa@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>X86ISD::VZEXT node is defined to work on integer types only.
In the following IR code:
define internal fastcc <8 x float> @test(<8 x float> %inp3, <8 x float> %inp6,
<8 x float> %inp9) #0 {
entry:
%shuf6 = shufflevector <8 x float> %inp3, <8 x float> %inp9, <8 x i32> <i32
1, i32 10, i32 11, i32 13, i32 2, i32 13, i32 5, i32 0>
%sel6 = select <8 x i1> <i1 false, i1 true, i1 true, i1 false, i1 true, i1
false, i1 true, i1 false>, <8 x float> %shuf6, <8 x float> zeroinitializer
%shuf7 = shufflevector <8 x float> zeroinitializer, <8 x float> %sel6, <8 x
i32> <i32 6, i32 11, i32 6, i32 15, i32 12, i32 11, i32 1, i32 3>
%shuf8 = shufflevector <8 x float> %inp6, <8 x float> %shuf7, <8 x i32> <i32
15, i32 10, i32 7, i32 2, i32 12, i32 undef, i32 3, i32 2>
ret <8 x float> %shuf8
}
the input for the extract_subvector instruction should be bitcasted to integer
type type before feeding it to zero-extend.
<span class="quote">> ../../build/bin/llc -mattr=+avx2 test.ll -o test.s</span >
LLVM ERROR: Cannot select: t126: v4i64 = X86ISD::VZEXT t125
t125: v4f32 = extract_subvector t2, Constant:i64<0>
t2: v8f32,ch = CopyFromReg t0, Register:v8f32 %vreg0
t1: v8f32 = Register %vreg0
t124: i64 = Constant<0>
In function: test</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>