PATCH combine.c bug: Bad to transform (cmpop (minus A B) 0) into (cmpop A B).
Jeffrey A Law
law@cygnus.com
Wed Apr 5 09:44:00 GMT 2000
In message < 200004041430.QAA29260@ignucius.axis.se >you write:
> > > * combine.c (simplify_comparison) [MINUS]: Do not replace
> > > all (op (minus A B) 0) with (op A B).
> > This might be too pessimistic -- shouldn't we allow this transformation
> > for any OP that doesn't depend on overflow? That would be EQ, NE, GEU, G
> TU,
> > LEU, and LTU?
>
> As I mentioned, equality comparisons (EQ, NE) are handled by the
> code after this deleted code. Since you brought it up, I
> thought I should check that the trivial transformations to
> equality comparisons were performed for the unsigned
> comparisons. To test, I used the (now committed) test case,
> tweaked the type of the operands and the comparison operator and
> checked what landed in simplify_comparison. It seems the right
> conversions were done:
Thanks for doing this investigation. Your patch is fine with or
without the additional comments.
jeff
More information about the Gcc-patches
mailing list