<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 - Incorrect transformation: (undef u>> a) ^ -1 -> undef >> a, when a != 0"
href="https://bugs.llvm.org/show_bug.cgi?id=45447">45447</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect transformation: (undef u>> a) ^ -1 -> undef >> a, when a != 0
</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>Keywords</th>
<td>miscompilation
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nunoplopes@sapo.pt
</td>
</tr>
<tr>
<th>CC</th>
<td>juneyoung.lee@sf.snu.ac.kr, lebedev.ri@gmail.com, llvm-bugs@lists.llvm.org, regehr@cs.utah.edu, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>Test: Transforms/InstCombine/vector-xor.ll
Summary: (undef u>> a) ^ -1 always leaves top bits as 1 when a > 0. However
'undef >> a' can leave top bits as 0 or 1, depending on the sign bit of undef.
define <4 x i32> @test_v4i32_not_lshr_nonnegative_const_undef(<4 x i32> %a0) {
%1 = lshr <4 x i32> { 3, 5, undef, 9 }, %a0
%2 = xor <4 x i32> { 4294967295, 4294967295, 4294967295, undef }, %1
ret <4 x i32> %2
}
=>
define <4 x i32> @test_v4i32_not_lshr_nonnegative_const_undef(<4 x i32> %a0) {
%1 = ashr <4 x i32> { 4294967292, 4294967290, undef, 4294967286 }, %a0
ret <4 x i32> %1
}
Transformation doesn't verify!
ERROR: Value mismatch
Example:
<4 x i32> %a0 = < #x00000000 (0), #xfffffffe (4294967294, -2), #x0000001f (31),
#xfffffffe (4294967294, -2) >
Source:
<4 x i32> %1 = < #x00000003 (3), poison, #x00000000 (0) [based on undef value],
poison >
<4 x i32> %2 = < #xfffffffc (4294967292, -4), poison, #xffffffff (4294967295,
-1), poison >
Target:
<4 x i32> %1 = < #xfffffffc (4294967292, -4), poison, #x00000000 (0), poison >
Source value: < #xfffffffc (4294967292, -4), poison, #xffffffff (4294967295,
-1), poison >
Target value: < #xfffffffc (4294967292, -4), poison, #x00000000 (0), poison >
<a href="https://web.ist.utl.pt/nuno.lopes/alive2/index.php?hash=2009353267698970&test=Transforms%2FInstCombine%2Fvector-xor.ll">https://web.ist.utl.pt/nuno.lopes/alive2/index.php?hash=2009353267698970&test=Transforms%2FInstCombine%2Fvector-xor.ll</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>