[Bug tree-optimization/15757] Convert "If (a >= b) X else if (b <= a) Y" into "if (a >= b) X".
law at redhat dot com
gcc-bugzilla@gcc.gnu.org
Sat Jun 5 20:22:00 GMT 2004
------- Additional Comments From law at redhat dot com 2004-06-05 20:22 -------
Subject: Re: Convert "If (a >= b) X else if
(b <= a) Y" into "if (a >= b) X".
On Tue, 2004-06-01 at 05:20, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-01 11:20 -------
> Confirmed.
>
> Hmm, looks like jump threading needs a little improvement.
No. More correctly, we do not canonicalize equivalent expressions.
What we're looking at is canonicalizing commutative operators and
conditionals so that given two SSA_NAMEs as operands, they will
be automatically ordered such that the lowest SSA_NAME_VERSION
appears first. Given an SSA_NAME and a constant, the SSA_NAME
should come first.
A prototype of this (of course) fixes this problem. I'm still
evaluating that prototype.
jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15757
More information about the Gcc-bugs
mailing list