This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/15757] Convert "If (a >= b) X else if (b <= a) Y" into "if (a >= b) X".


------- 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


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