[patch] fix PR30784 - have fold_ternary handle CONSTRUCTORs

Richard Guenther richard.guenther@gmail.com
Sat Mar 24 18:47:00 GMT 2007


On 3/24/07, Dorit Nuzman <DORIT@il.ibm.com> wrote:
>
> Hi,
>
> We have a '{2,2}' expression (vector initializer) propagated by dom into a
> BIT_FIELD_REF, which fails verify_stmts. We want BIT_FIELD_REF to be folded
> to a constant or the propagation not done.   The proper folding doesn't
> take place because for the case of BIT_FIELD_REF fold_ternary folds only if
> operand 0 is a VECTOR_CST. In our case it's a CONSTRUCTOR. This patch makes
> fold_ternary consider the case that operand 0 of a BIT_FIELD_REF is a
> CONSTRUCTOR.
>
> Passed bootstrap with vectorization enabled on powerpc64-linux, and the
> vectorizer testcases.
> Passed partial bootstrap (c,c++) on i386-linux, and the vectorizer
> testcases.
>
> Thanks to Richard Guenther for the very helpful hints,
>
> Ok for mainline once passes full regression testing?

Yes,
Thanks,
Richard.

> thanks,
> dorit
>
> :ADDPATCH fold:
>
> ChangeLog:
>
>         * fold-const.c (fold_ternary): Handle CONSTRUCTOR in case
>         BIT_FIELD_REF.
>
> testsuite/ChangeLog:
>
>        * gcc.dg/vect/pr30784.c: New test.
>
> (See attached file: pr30784.txt)
>



More information about the Gcc-patches mailing list