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: VRP speedup


On Sun, 2006-12-03 at 18:58 +0100, Jan Hubicka wrote:
> > On Sun, 2006-12-03 at 15:21 +0100, Jan Hubicka wrote:
> > > 
> > > +   return tcmp == boolean_true_node; 
> > 
> > I would not do that, I would just do integer_onep (tcmp).
> > As I don't trust fold_binary_to_constant returning always
> > boolean_true_node.
> 
> It is what old code did and I must say I can't figure out way how the
> fold_binary_to_constant can correctly behave otherwise.  Perhaps instead
> of extra function call on the quite hot code, we can add gcc_assert that
> integer_one_p is equivalent to this test?

I think there is at least one case where integer_onep would return true
and the direct comparision to boolean_true_node would be false:
>From fold-const.c:8351 (fold_comparison):
                  /* Always true.  */
                  return omit_one_operand (type, integer_one_node,
arg0);


Thanks,
Andrew Pinski


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