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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Roger Sayle from comment #3)
> Here's the fix that I'm currently testing...
> 
>  (simplify
>   (convert (lshift:s@0 (convert:s@1 @2) INTEGER_CST@3))
> - (if (tree_nop_conversion_p (type, TREE_TYPE (@0))
> + (if (INTEGRAL_TYPE_P (type)
> +      && !POINTER_TYPE_P (type)

either of both is redundant, I think keeping INTEGRAL_TYPE_P is better.

> +      && tree_nop_conversion_p (type, TREE_TYPE (@0))
>        && INTEGRAL_TYPE_P (TREE_TYPE (@2))
>        && TYPE_PRECISION (TREE_TYPE (@2)) <= TYPE_PRECISION (type))
>    (lshift (convert @2) @3)))

Reply via email to