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/14341] Missed comparision optimization (jump threading related)


------- Additional Comments From kazu at cs dot umass dot edu  2005-01-31 14:03 -------
The first two cases are optimized as expected.

The third one is wrong.  Here is mostly likely what Andrew Pinski meant to say.

void
t2 ()
{
  int i;
  int x;
  for (i = 0; i < 100000000; i++)
    {
      int t = (
      {
	int j = i;

	if (j < 100000000)
	  j = 1;
	else
	  j = 0;
	j;
      }
      );
      f (t);
    }
}

which is again optimized as optimized.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14341


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