<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 - Cmov regression"
href="https://bugs.llvm.org/show_bug.cgi?id=34415">34415</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Cmov regression
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>babokin@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Test cases below produce different result on -O0 and -O2. Bisection points to
cmov conversion pass. As Craig noted in #34381, this is regression after
r311226.
<span class="quote">>cat f1.cpp</span >
#include <stdio.h>
signed char var_48 = -43;
signed char var_2 = 56;
unsigned int var_20 = 3609732948U;
long int var_30 = 7058958203059653819L;
void foo() {
if ((6L + var_48) / 5)
var_30 = var_2 ? var_48 : var_20;
}
int main() {
foo();
printf("%ld\n", var_30);
return 0;
}
<span class="quote">>cat f2.cpp</span >
#include <stdio.h>
unsigned long int var_69 = 0;
unsigned long int var_26 = 2567499382298705128UL;
unsigned int var_54 = 606989740U;
unsigned int var_12 = 1622378007U;
void foo() { var_69 = var_26 ? var_54 == 0 ? var_12 : int(var_26) : 0; }
int main() {
foo();
printf("%lu\n", var_69);
return 0;
}</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>