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



--- Comment #5 from Yuri Rumyantsev <ysrumyan at gmail dot com> 2013-02-11 
13:42:49 UTC ---

This pattern is already recognized by simplify_bitwise_binary but only for

usual int type, i.e. if we change all short types to the ordinary int (or

unsigned) this simplification takes place (dump after 1st forwprop):



  <bb 4>:

  x_8 = x_2(D) >> 1;

  y_9 = y_4(D) >> 1;

  _10 = x_8 & 1;

  _11 = y_9 & 1;

  _16 = x_8 ^ y_9;

  z_12 = _16 & 1;



i.e. the issue is redundant type conversions:



  <bb 3>:

  x_7 = x_2(D) >> 1;

  y_8 = y_4(D) >> 1;

  _13 = x_7 & 1;

  _9 = (signed char) _13;

  _14 = y_8 & 1;

  _10 = (signed char) _14;

  _11 = _9 ^ _10;



I assume that if we delete these redundant conversions the required

simplification will happen.

Reply via email to