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

--- Comment #5 from Drea Pinski <pinskia at gcc dot gnu.org> ---
```
  if (_1 < a_4(D))
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870912]:
  x_5 = BIT_INSERT_EXPR <x_3(D), a_4(D), 0>;

  <bb 4> [local count: 1073741824]:
  # x_2 = PHI <x_3(D)(2), x_5(3)>
```

This could be handled in factor_out_conditional_operation.
instead of:
```
     if (arg1_op.code != arg0_op.code)
        return false;
```
look for BIT_INSERT_EXPR as one of the 2 codes. If the other arg is the same as
the first arg to bit_insert_expr then you can do the factoring.
This is similar to a conditionalstore-elim but with BIT_INSERT_EXPR.

Reply via email to