https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103216

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-11-13
             Status|UNCONFIRMED                 |NEW
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot 
gnu.org

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
  b_3 = a_2(D) & 127;
  c_4 = (signed char) b_3;
  d_5 = (signed char) a_2(D);
  if (d_5 < 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  v_7 = c_4 | -128;

  <bb 4> :
  # v_1 = PHI <c_4(2), v_7(3)>


  (d<0) ? (c | -128) : c ->
      c | ((d<0) ? -128 : 0) ->
      c | ((d<0) << 7) ->
      c | (d & -128) ->
      (c|d) & c|-128 ->
      ((signed char)(b | a)) & ((singed char)a|128) ->
      ((signed char)((a&128) | a)) & ((singed char)a|128) ->
      ((signed char)a) & ((singed char)a|128) ->
      (signed char)(a & (a|128))-> 
      (signed char)a

Hopefully I did this right.

I am going to implement this.  I think I only need the first conversion (and
making sure cond goes away which leads to the second one) which should lead to
the rest (after having fixed PR 103218 which I am doing first which is needed
to get the 4th line).

Reply via email to