https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101339
Bug ID: 101339
Summary: (bit_and (negate (convert thurth_value@1))
integer_onep) is not optimized to just @1
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Take:
int f(int a, int b)
{
_Bool c = a == b;
int t = c;
int t1 = -t;
return t1 & 1;
}
---- CUT ---
This is not optimized to just "return (int)(a == b)" at the gimple level