<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 - [5/6/7/8 Regression] Multiple returns are produced where previously was only one"
href="https://bugs.llvm.org/show_bug.cgi?id=41571">41571</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[5/6/7/8 Regression] Multiple returns are produced where previously was only one
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>5.0
</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>Keywords</th>
<td>code-quality
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</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>nok.raven@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>bool foo(int x)
{
if (x == 123 || x == 456)
return true;
return false;
}
Since 5.0:
mov al, 1
cmp edi, 123
je .LBB0_3
cmp edi, 456
jne .LBB0_2
.LBB0_3:
ret
.LBB0_2:
xor eax, eax
ret
Before 5.0:
mov al, 1
cmp edi, 123
je .LBB0_3
cmp edi, 456
je .LBB0_3
xor eax, eax
.LBB0_3:
ret
<a href="https://godbolt.org/z/RW_dag">https://godbolt.org/z/RW_dag</a>
The same happened to x86 and ARM64.</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>