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 target/35766] a?a+C:0 can be done branchless



------- 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


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