[llvm-bugs] [Bug 45866] New: Failure to optimize combined bitfield tests properly
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun May 10 16:42:53 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45866
Bug ID: 45866
Summary: Failure to optimize combined bitfield tests properly
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Support Libraries
Assignee: unassignedbugs at nondot.org
Reporter: gabravier at gmail.com
CC: llvm-bugs at lists.llvm.org
struct s
{
int a : 1;
int b : 1;
int c : 1;
};
bool f(s x)
{
return x.a && x.b && !x.c;
}
This can be converted to `(x & 7) == 3` (after conversion to `uint8_t`). GCC
does this transformation, but LLVM does not.
--
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/20200510/eae11590/attachment.html>
More information about the llvm-bugs
mailing list