[patch] Fix PR48183, NEON ICE in emit-rtl.c:immed_double_const() under -g

Richard Guenther richard.guenther@gmail.com
Sun Mar 20 11:11:00 GMT 2011


On Sun, Mar 20, 2011 at 12:01 PM, Chung-Lin Tang
<cltang@codesourcery.com> wrote:
> Hi,
> PR48183 is a case where ARM NEON instrinsics, under -O -g, produce debug
> insns that tries to expand OImode (32-byte integer) zero constants, much
> too large to represent as two HOST_WIDE_INTs; as the internals manual
> indicates, such large constants are not supported in general, and ICEs
> on the GET_MODE_BITSIZE(mode) == 2*HOST_BITS_PER_WIDE_INT assertion.
>
> This patch allows the cases where the large integer constant is still
> representable using a single CONST_INT, such as zero(0). Bootstrapped
> and tested on i686 and x86_64, cross-tested on ARM, all without
> regressions. Okay for trunk?

Hum, if you make it fit into a CONST_INT why not make it fit into a CONST_DOUBLE
where it should _always_ fit because of the limits of the arguments given to
immed_double_const.  Thus, why not simply remove the assert - also a question
for other reviewers?  Or rather, why does immed_double_const have a mode
argument and does not require the caller to properly truncate?

Thanks,
Richard.

> Thanks,
> Chung-Lin
>
> 2011-03-20  Chung-Lin Tang  <cltang@codesourcery.com>
>
>        * emit-rtl.c (immed_double_const): Allow wider than
>        2*HOST_BITS_PER_WIDE_INT mode constants when they are
>        representable as a single const_int RTX.
>



More information about the Gcc-patches mailing list