[PATCH, rtl-optimization]: Fix PR rtl-optimization/32293: internal compiler error: in do_SUBST, at combine.c

Richard Guenther richard.guenther@gmail.com
Tue Jun 12 09:54:00 GMT 2007


On 6/12/07, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> The problem, exposed by attached testcase is in
> simplify_if_then_else(). This function checks single-bit checks by
> assigning "nzb = nonzero_bits (from, GET_MODE (from))". However,
> nonzero_bits() returns unsigned HWI and this produces wrong CONST_INT
> rtx (for 0x80000000 nzb) for SImode expressions in case of 64bit HWI.
>
> The solution is to call trunc_int_for_mode() to truncate "nzb" to
> correct mode (SImode in attached testcase).
>
> Patch was bootstrapped on i686-pc-linux-gnu and regression tested for
> all default languages. Although the patch is almost obvious... is it
> OK for mainline?

Yes, this is ok for mainline.

Thanks,
Richard.

> 2007-06-12  Uros Bizjak  <ubizjak@gmail.com>
>
>         PR rtl-optimization/32293
>         * combine.c (simplify_if_then_else): Truncate return from
>         nonzero_bits() to correct mode.
>
> testsuite/ChangeLog:
>
> 2007-06-12  Uros Bizjak  <ubizjak@gmail.com>
>
>         PR rtl-optimization/32293
>         * gcc.dg/pr32293.c: New test.
>
> Uros.
>
>



More information about the Gcc-patches mailing list