This is the mail archive of the gcc@gcc.gnu.org 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] | |
> On 3/14/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:
> >
> > before (bug.c.105t.vrp2):
> >
> > vector long int vect_cst_.47;
> > vect_cst_.47_66 = {2, 2};
> > D.2103_79 = BIT_FIELD_REF <vect_cst_.47_66, 64, 0>;
> >
> > after (bug.c.106t.dom3):
> > "
> > Optimizing block #7
> >
> > Optimizing statement <L0>:;
> > Optimizing statement D.2102_78 = BIT_FIELD_REF
<vect_vec_iv_.48_67,
> > 64, 0>;
> > Optimizing statement D.2103_79 = BIT_FIELD_REF <vect_cst_.47_66,
64,
> > 0>;
> > Replaced 'vect_cst_.47_66' with constant '{2, 2}'
> > "
> >
> > D.2103_79 = BIT_FIELD_REF <{2, 2}, 64, 0>;
> >
> >
> > ...which causes he following ICE:
> > "
> > bug.c:8: error: invalid reference prefix
> > {2, 2}
> > bug.c:8: internal compiler error: verify_stmts failed
> > "
> >
> > Several testcases are available in the bugzilla report (PR30784).
> >
> > So, the question is - what needs to be fixed - is it copy propagation
that
> > allows propagating the initializer into a BIT_FIELD_REF? or vect_lower
pass
> > that creates these BIT_FIELD_REFs after vectorization?
>
> I think the BIT_FIELD_REF should be properly folded to a constant or
> the propagation
> not done. fold_stmt_inplace is the candidate to look at,
> propagate_rhs_into_lhs in
> tree-ssa-dom.c to reject propagation into BIT_FIELD_REF.
> fold_ternary should be
> able to fold the BIT_FIELD_REF in question, it would be interesting to
> know why it
> doesn't.
>
the problem is that for the case of BIT_FIELD_REF fold_ternary folds only
if operand 0 is VECTOR_CST. In our case it's a CONSTRUCTOR. I'm testing the
patch below (comments?).
Thanks a bunch!
dorit
(See attached file: fix.txt)
> Richard.Attachment:
fix.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |