public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14011] New: [tree-ssa] C++ doesn't optimize bool as well as C.
@ 2004-02-04 6:14 rth at gcc dot gnu dot org
2004-02-04 6:31 ` [Bug optimization/14011] " pinskia at gcc dot gnu dot org
2004-02-11 21:45 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-02-04 6:14 UTC (permalink / raw)
To: gcc-bugs
For the test case in PR 13869, C99 optimizes the function to just
"return 0", while C++ can't figure that out.
--
Summary: [tree-ssa] C++ doesn't optimize bool as well as C.
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14011
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug optimization/14011] [tree-ssa] C++ doesn't optimize bool as well as C.
2004-02-04 6:14 [Bug optimization/14011] New: [tree-ssa] C++ doesn't optimize bool as well as C rth at gcc dot gnu dot org
@ 2004-02-04 6:31 ` pinskia at gcc dot gnu dot org
2004-02-11 21:45 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-04 6:31 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug optimization/14011] [tree-ssa] C++ doesn't optimize bool as well as C.
2004-02-04 6:14 [Bug optimization/14011] New: [tree-ssa] C++ doesn't optimize bool as well as C rth at gcc dot gnu dot org
2004-02-04 6:31 ` [Bug optimization/14011] " pinskia at gcc dot gnu dot org
@ 2004-02-11 21:45 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-11 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-11 21:45 -------
Fixed by:
* Makefile.in (OBJS-common): Add tree-ssa-forwprop.o
(tree-ssa-forwprop.o): Add dependencies.
* timevar.def (TV_TREE_FORWPROP): New timevar.
* tree-optimize.c (init_tree_optimization_passes): Link in
the forward propagation pass.
* tree-pass.h (pass_forwprop): Declare.
* tree-ssa-forwprop.c: New file with forward propagation pass.
* doc/invoke.texi: Document dump for forward propagation pass.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14011
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-11 21:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-04 6:14 [Bug optimization/14011] New: [tree-ssa] C++ doesn't optimize bool as well as C rth at gcc dot gnu dot org
2004-02-04 6:31 ` [Bug optimization/14011] " pinskia at gcc dot gnu dot org
2004-02-11 21:45 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).