You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was difficult to title the issue. Feel free to modify it appropriately.
Consider the following functions:
boolf_and(int x,int y)
{
bool a = x == 0;
bool b = y == 0;
bool t = a & b;
return t & !a;
}
boolf_or(int x,int y)
{
bool a = x != 0;
bool b = y != 0;
bool t = a | b;
return t | !a;
}
The function f_and can be optimized to 0, and f_or can be optimized to 1.
It was difficult to title the issue. Feel free to modify it appropriately.
Consider the following functions:
The function
f_and
can be optimized to 0, andf_or
can be optimized to 1.https://godbolt.org/z/nWq194nz9
https://alive2.llvm.org/ce/z/PPCfP9
FYI (original issue)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111542
The text was updated successfully, but these errors were encountered: