This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/15350] [tree-ssa] Convert if ((1 << a) & 1) into if (a == 0).
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 May 2005 19:08:13 -0000
- Subject: [Bug tree-optimization/15350] [tree-ssa] Convert if ((1 << a) & 1) into if (a == 0).
- References: <20040509195047.15350.kazu@cs.umass.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-08 19:08 -------
Hmm, we do optimize this with ashiftrt but not with ashift.
We also fold ((1 << a) & 1) != 0 into ((1 >> a & 1) != 0) which gets optimized on the RTL level.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15350