This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/35766] a?a+C:0 can be done branchless
- 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: 29 Dec 2008 03:46:15 -0000
- Subject: [Bug target/35766] a?a+C:0 can be done branchless
- References: <bug-35766-15989@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-12-29 03:46 -------
Actually this comes down to optimizing:
int f(int a)
{
if (a)
return a +4;
return 0;
}
Into the sequence which is mentioned, that is using subtract with borrow and
such.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c++ |target
Ever Confirmed|0 |1
GCC target triplet| |i?86-*-*
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2008-12-29 03:46:15
date| |
Summary|Should cast pointers and |a?a+C:0 can be done
|references more efficiently |branchless
|and safely |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35766