[Bug optimization/14011] [tree-ssa] C++ doesn't optimize bool as well as C.

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 4 06:31:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-04 06:31 -------
Confirmed, the difference is how the frontend does if(!bool).
C++:
            T.0 = !my_bool;
            if (T.0)
C:
          my_bool.0 = (int)my_bool;
          if (my_bool.0 == 0)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |pessimizes-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-04 06:31:55
               date|                            |
   Target Milestone|---                         |tree-ssa


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14011



More information about the Gcc-bugs mailing list