This is the mail archive of the gcc-patches@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]

Re: [RFC] [tree-ssa] Fix handling of BIT_FIELD_REFs andVECTOR_TYPEs


On Mon, 2004-03-22 at 13:09, Paolo Bonzini wrote:
> > I *think* I've seen BIT_FIELD_REFs on the LHS of assignments and we were
> > DTRT, because the variable was already marked non-gimple.  So, it seems
> > to me that just marking VECTOR_TYPE as non-gimple ought to suffice.
> 
> Translated to code? :-)
> 
You had the right bits in your patch, already:

        (is_gimple_reg_type): A VECTOR_TYPE does not behave like
        a scalar.

But I misled you.  What I meant wasn't 'non-gimple', it was
'non-register'.  Sorry.  That is, for BIT_FIELD_REF <x,0,32>,
is_gimple_reg(x) should be 'false'.


> I'll check it out.  But to trigger the bug you need *two consecutive*
> BIT_FIELD_REFs.  I'll see if I can construct a testcase, though it seems quite
> hard.
> 
Yes.  But to trigger the abort() all you need is something along the
lines of 
	if (TREE_CODE (stmt) == MODIFY_EXPR
	    && TREE_CODE (TREE_OPERAND (stmt, 0)) == BIT_FIELD_REF
	    && is_gimple_reg (TREE_OPERAND (TREE_OPERAND (stmt, 0), 0)))
	  abort();

> Dan commented on the first one.  The second one seems obvious.  What about the
> other two, especially if I can build a testcase?
> 
The change to set_is_used is OK.  I think that the change to
get_expr_operands shouldn't be necessary.


Diego.


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