This is the mail archive of the 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: Java: Fix jcf-write fold() fallout

>>>>> "Bryce" == Bryce McKinlay <> writes:

Bryce> +    case UNLT_EXPR:
Bryce> +      unordered = 1;
Bryce>      case GT_EXPR:
Bryce>        op = OPCODE_if_icmpgt;
Bryce>        goto compare;

I think UNLT_EXPR(a,b) means "a < b, or a and b are unordered".
So, this means it is equivalent to !(a >= b) -- if a and b are
unordered, then "a >= b" is false.
So, the dual of UNLT_EXPR is GE_EXPR, not GT_EXPR.
Something similar applies to most of the other cases as well.

IMO the comments concerning unordered comparisons in tree.def could
usefully be much more explicit.  As it is they are quite minimal and
cryptic.  It took me a while to understand that the `...' in this

/* These are equivalent to unordered or ...  */

... referred to the corresponding unordered comparison operator.

Also, I see that UNLT_EXPR and friends are documented in c-tree.texi.
What's the plan here?  I would like to see documentation for GENERIC
show up in tree-ssa.texi or in a new file.  (Perhaps c-tree.texi makes
the distinction clear, I haven't read the whole thing, in which case,


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