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: [PATCH] reorganize simplify_const_relational_operation


Eric Botcazou wrote:
The (unsigned HOST_WIDE_INT) cast is needed on the low0 < low1
comparison too.

Not really, look at their type. :-)

Ah, right, if we are comparing -128 (0xFFFFFF80) with 127 (0x0000007F) we would already have high0 != high1. I wonder if it is a bug in double_int_scmp, which uses HOST_WIDE_INT for the low part in signed comparisons.


It's meant to be used elsewhere, where we are only interested in
true/false results (not other simplifications).  That's also why it
doesn't return FLOAT_STORE_FLAG_VALUE for floats, but only
const0/const_true.

What's the relationship with 'static'? It's only used in simplify-rtx.c.

API orthogonality. It's meant to be used elsewhere, it just happens that it's not; since we have simplify_const_{un,bin}ary_operation, it is reasonable to expect a similar function for relational operations not to be static.


In fact, since originally simplify_relational_operation was doing what is now known as simplify_const_relational_operation, it might be the case that some users could be switched right away.

Paolo


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