Jakub Jelinek <jakub at gcc dot> changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot      |jakub at gcc dot

--- Comment #7 from Jakub Jelinek <jakub at gcc dot> ---
Created attachment 43922

The problem is that cse.c (fold_rtx) uses simplify_unary_operation and that
contains stuff like:
          else if (! CLZ_DEFINED_VALUE_AT_ZERO (imode, int_value))
            int_value = GET_MODE_PRECISION (imode);
That is fine in some optimization passes, where we just want some value for the
expression, but not in cse, where we want to record that some register has this
constant value and then optimize other uses of the same constant,
canonicalizing to that register.  Of course, when the value is not defined for
zero, the register contains some random value, not the constant we've computed.

So, either we can do what the patch does, or punt instead of returning
GET_MODE_PRECISION in simplify-rtx.c.

Reply via email to