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: [email protected]
Reporter: [email protected]
CC: [email protected]
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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs