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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |17.0

--- Comment #14 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Just a quick note, f1 and f4 are fixed are producing the best code for the
trunk.

for f2:
`y % (4 << (x * 2)) == 0` could be changed into:
(y & ((4 << (x * 2 + 1))-1) == 0


And then:
  _13 = (int) x_10;
  _3 = _13 << 1;
  _4 = _3 + 1;
  _5 = 4 << _4;
  _6 = _5 + -1;

Changed into:
_6 = x_10 ? 15 : 3

Or change: `4 << (x * 2)` into `x ? 16 : 4` first (and remove the conversion
the other way).  and then have (y % (x ? 16 : 4)) == 0 into `y & (x ? 15 : 3)
== 0`. If all single use.

Reply via email to