This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/64992] More optimize opportunity


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64992

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
if a was signed, then a * 2 == 0 just becomes a == 0 as if a * 2 overflows that
would become undefined
For unsigned, if a has a range of [0,(unsigned)INT_MAX] then a * 2 == 0 can be
optimized to a == 0.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]