[llvm-bugs] [Bug 41571] New: [5/6/7/8 Regression] Multiple returns are produced where previously was only one
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 23 09:54:33 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41571
Bug ID: 41571
Summary: [5/6/7/8 Regression] Multiple returns are produced
where previously was only one
Product: new-bugs
Version: 5.0
Hardware: PC
OS: All
Status: NEW
Keywords: code-quality
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: nok.raven at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
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
https://godbolt.org/z/RW_dag
The same happened to x86 and ARM64.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190423/93a1a2ce/attachment-0001.html>
More information about the llvm-bugs
mailing list