This is the mail archive of the gcc-patches@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]

Re: Sped up predicate in cse.c



On Feb 8, 2005, at 6:00 PM, Christophe Jaillet wrote:


Description : function preferable in cse.c can be simplified if we notice
that, at the end of the function :
if (regcost_a != regcost_b)
return regcost_a - regcost_b;
return 0;


So, if regcost_a == regcost_b, we return 0, but in this case (regcost_a -
regcost_b) is also = 0.
There is no need for the test, and (return regcost_a - regcost_b;) wins in
all cases.

Can you file a bug report for this optimization because we should be doing
this and not manually.


-- Pinski


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