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 tree-optimization/15911] DOM optimization not performed


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


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