<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 - llvm.masked.compressstore.v16i8 fails to select on x86 with SSE4.2"
href="https://bugs.llvm.org/show_bug.cgi?id=40994">40994</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm.masked.compressstore.v16i8 fails to select on x86 with SSE4.2
</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: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>gonzalobg88@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>This (godbolt: <a href="https://godbolt.org/z/DQF-KK">https://godbolt.org/z/DQF-KK</a>):
declare void @llvm.masked.compressstore.v16i8(<16 x i8>, i8*, <16 x i1>) #0
define <8 x i8> @foo(<16 x i8> %a) {
%v = alloca i8, i32 8, align 16
call void @llvm.masked.compressstore.v16i8(<16 x i8> %a, i8* %v, <16 x i1>
<i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1
true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false>)
%ptr = bitcast i8* %v to <8 x i8>*
%out = load <8 x i8>, <8 x i8>* %ptr
ret <8 x i8> %out
}
attributes #0 = { argmemonly nounwind }
fails with:
LLVM ERROR: Cannot select: 0x563fc1c63d20: ch = masked_store<(store 16 into
%ir.v), compressing> 0x563fc1bed668, 0x563fc1c63b18, FrameIndex:i64<0>,
0x563fc1c63c50
0x563fc1c63b18: v16i8,ch = CopyFromReg 0x563fc1bed668, Register:v16i8 %0
0x563fc1c63ab0: v16i8 = Register %0
0x563fc1c63b80: i64 = FrameIndex<0>
0x563fc1c63c50: v16i8,ch = load<(load 16 from constant-pool)> 0x563fc1bed668,
0x563fc1c64198, undef:i64
0x563fc1c64198: i64 = X86ISD::Wrapper TargetConstantPool:i64<<16 x i8> <i8
-1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8
-1, i8 0, i8 -1, i8 0>> 0
0x563fc1c63d88: i64 = TargetConstantPool<<16 x i8> <i8 -1, i8 0, i8 -1,
i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 -1,
i8 0>> 0
0x563fc1c63df0: i64 = undef
In function: foo
Compiler returned: 1
---
I'll expect LLVM to be able to lower this to pshufb on SSSE3, and something
better in AVX.</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>