> Yeah, in hindsight, the patch was definitely lacking commentary.
> How about the patch below?  It also fixes the partial int case
> and gets rid of the errant NOT hunk.  Tested in the same way as before.
> 
> Richard
> 
> 
> gcc/
>       * machmode.h (GET_MODE_UNIT_PRECISION): New macro.
>       * simplify-rtx.c (simplify_truncation): New function,
>       extracted from simplify_subreg and (in small part) from
>       simplify_unary_operation_1.
>       (simplify_unary_operation_1) <TRUNCATE>: Use it.  Remove sign bit
>       test for !TRULY_NOOP_TRUNCATION_MODES_P.
>       (simplify_subreg): Use simplify_truncate for lowpart subregs
>       where both the inner and outer modes are scalar integers.

This looks good to me, thanks.

-- 
Eric Botcazou

Reply via email to