[llvm-bugs] [Bug 52066] New: Failure to optimize out dead store when address is of one of two unused locals
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 4 09:08:15 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52066
Bug ID: 52066
Summary: Failure to optimize out dead store when address is of
one of two unused locals
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: gabravier at gmail.com
CC: llvm-bugs at lists.llvm.org
int foo(bool c)
{
int a, b;
return *(c ? &a : &b) = 0;
}
This can be optimized to `return 0;`. This optimization is done by GCC, but not
LLVM.
--
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/20211004/12f2087b/attachment.html>
More information about the llvm-bugs
mailing list