<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] Assertion failure in X86 shuffle combine"
href="https://bugs.llvm.org/show_bug.cgi?id=51858">51858</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[X86] Assertion failure in X86 shuffle combine
</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>enhancement
</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>nikita.ppv@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, pengfei.wang@intel.com, spatel+llvm@rotateright.com
</td>
</tr>
<tr>
<th>Blocks</th>
<td>51236
</td>
</tr></table>
<p>
<div>
<pre>define i8 @test(i128 %arg) {
%vec = bitcast i128 %arg to <16 x i8>
%red = tail call i8 @llvm.vector.reduce.mul.v16i8(<16 x i8> %vec)
ret i8 %red
}
declare i8 @llvm.vector.reduce.mul.v16i8(<16 x i8>)
Not a vector MVT!
UNREACHABLE executed at
/home/nikic/llvm-project/llvm/include/llvm/Support/MachineValueType.h:686!
[...]
#6 0x0000559214dc715c combineX86ShuffleChain(llvm::ArrayRef<llvm::SDValue>,
llvm::SDValue, llvm::ArrayRef<int>, int, bool, bool, bool, llvm::SelectionDAG&,
llvm::X86Subtarget const&) X86ISelLowering.cpp:0:0
#7 0x0000559214e1cbbf
combineX86ShufflesRecursively(llvm::ArrayRef<llvm::SDValue>, int,
llvm::SDValue, llvm::ArrayRef<int>, llvm::ArrayRef<llvm::SDNode const*>,
unsigned int, unsigned int, bool, bool, bool, llvm::SelectionDAG&,
llvm::X86Subtarget const&) X86ISelLowering.cpp:0:0
#8 0x0000559214e27181 combineX86ShufflesRecursively(llvm::SDValue,
llvm::SelectionDAG&, llvm::X86Subtarget const&) (.constprop.0)
X86ISelLowering.cpp:0:0
#9 0x0000559214e2aceb combineEXTEND_VECTOR_INREG(llvm::SDNode*,
llvm::SelectionDAG&, llvm::TargetLowering::DAGCombinerInfo&, llvm::X86Subtarget
const&) X86ISelLowering.cpp:0:0
Note that the vector.reduce.mul is expanded in IR, so the actual input is this:
define i8 @test(i128 %arg) {
%vec = bitcast i128 %arg to <16 x i8>
%rdx.shuf = shufflevector <16 x i8> %vec, <16 x i8> poison, <16 x i32> <i32
8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 undef, i32 undef,
i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
%bin.rdx = mul <16 x i8> %vec, %rdx.shuf
%rdx.shuf1 = shufflevector <16 x i8> %bin.rdx, <16 x i8> poison, <16 x i32>
<i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32
undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32
undef>
%bin.rdx2 = mul <16 x i8> %bin.rdx, %rdx.shuf1
%rdx.shuf3 = shufflevector <16 x i8> %bin.rdx2, <16 x i8> poison, <16 x i32>
<i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32
undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32
undef, i32 undef>
%bin.rdx4 = mul <16 x i8> %bin.rdx2, %rdx.shuf3
%rdx.shuf5 = shufflevector <16 x i8> %bin.rdx4, <16 x i8> poison, <16 x i32>
<i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32
undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32
undef, i32 undef>
%bin.rdx6 = mul <16 x i8> %bin.rdx4, %rdx.shuf5
%1 = extractelement <16 x i8> %bin.rdx6, i32 0
ret i8 %1
}</pre>
</div>
</p>
<div id="referenced">
<hr style="border: 1px dashed #969696">
<b>Referenced Bugs:</b>
<ul>
<li>
[<a class="bz_bug_link
bz_status_NEW "
title="NEW - [meta] 13.0.0 Release Blockers"
href="https://bugs.llvm.org/show_bug.cgi?id=51236">Bug 51236</a>] [meta] 13.0.0 Release Blockers
</li>
</ul>
</div>
<br>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>