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 optimization/14753] [tree-ssa] some missed forward propagation opportunities


------- Additional Comments From kazu at cs dot umass dot edu  2004-03-31 02:42 -------
One more case.

void bar (void);

void
foo (unsigned int a)
{
  if ((a >> 5) & 1)
    bar ();
}

I get:

foo (a)
{
  _Bool T.2;
  unsigned int T.1;
  unsigned int T.0;

<bb 0>:
  T.0_2 = a_1 >> 5;
  T.1_3 = T.0_2 & 1;
  T.2_4 = (_Bool)T.1_3;
  if (T.2_4) goto <L0>; else goto <L1>;

<L0>:;
  bar () [tail call];

<L1>:;
  return;

}

We could have "if (T.1_3 != 0)".
If nothing else, we can eliminate one temporary variable.


-- 


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


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