This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/64992] More optimize opportunity
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 24 Jan 2016 07:15:52 +0000
- Subject: [Bug tree-optimization/64992] More optimize opportunity
- Auto-submitted: auto-generated
- References: <bug-64992-4 at http dot gcc dot gnu dot org/bugzilla/>
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.