This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/15911] DOM optimization not performed
- From: "dann at godzilla dot ics dot uci dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2004 22:24:06 -0000
- Subject: [Bug tree-optimization/15911] DOM optimization not performed
- References: <20040610171754.15911.dann@godzilla.ics.uci.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dann at godzilla dot ics dot uci dot edu 2004-06-10 22:24 -------
Hmmm, adding -march=athlon shows the same problem on i386.
The problem does not occur 0f -march=i386 is used.
The difference between the 2 cases above appears in the .t03.original dump:
For i386 the first "if" is translated to:
if (x > 5555 && y <= 6665)
the "&&" corresponds to a tree_andif_expr tree
for -march=athlon it is translated to:
if (#`truth_and_expr' not supported by pp_c_expression#)
here a truth_and_expr tree is used.
For i386 the && is transformed in cascading ifs, and DOM knows how to deal with
that.
For athlon the truth_and_expr is transformed to:
T.0 = x > 5555;
T.1 = y <= 6665;
T.2 = T.0 && T.1;
if (T.2) ....
In this case DOM does not infere that if T.2 is true then T.0 and T.1 are also
true.
The question is, should "&&" be lowered to different trees depending on the
target architecture?
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|enhancement |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15911