This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: gimplify vector constructors that aren't initialiser constants

On 10/29/07, Richard Sandiford <> wrote:
> This is a second attempt at fixing PR 33614.  We currently don't gimplify
> the contents of TREE_CONSTANT vector constructors, even if they need
> run-time evaluation.
> My first attempt at fixing this bug was based on the wrong assumption
> that we had two types of vector constructors: those that could be turned
> into VECTOR_CSTs and those that need run-time evaluation.  Andrew pointed
> out that there's a third category: vector constructors that can't be
> reduced to a VECTOR_CST but that are legitimate initialiser constants
> (e.g. those involving ADDR_EXPRs).  We want to continue to treat those
> constructors as TREE_CONSTANT.
> The patch below therefore adds an initializer_constant_valid_p check
> to the code that is trying to keep TREE_CONSTANT constructors.  If this
> check fails, we turn the constructor into a nonconstant value and
> gimplify the contents.
> Bootstrapped & regression-tested on x86_64-linux-gnu.  Also regression
> tested on mipsisa32-elf and mipsisa64-elf.  It fixes an ICE in
> compile/20050113-1.c for mipsisa32-elf and an ICE the attached
> testcase for x86_64-linux-gnu.  OK to install?

This is ok.


> Richard
> gcc/
>         PR tree-optimization/33614
>         * gimplify.c (gimplify_init_constructor): Gimplify vector constructors
>         if they can't be reduced to VECTOR_CSTs and aren't legitimate
>         initializer constants.
> gcc/testsuite/
>         PR tree-optimization/33614
>         * gcc.c-torture/compile/pr33614.c: New test.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]