[Bug middle-end/52436] BIT_FIELD_REF <MEM_REF <>> should be canonicalized for non-bitfield accesses

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 2 14:37:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52436

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> 2013-04-02 14:36:59 UTC ---
(In reply to comment #5)
> No, get_addr_base_and_unit_offset_1 only is supposed to return the
> addressable offset into an object - it doesn't care about access sizes.

It is also allowed to say "bad idea, I will return NULL", but ok.

> But you can't really do what you do there.  You are possibly
> transforming
[...]

Good point, thanks.

> which is not correct, obviously.  "combining" with memory
> accesses isn't trivial, certainly not a task I would consider
> for forwprop.  I can't think of a suitable existing pass
> that would combine this, but value-numbering should eventually
> value-number both cases the same at least.

I guess that leaves the vector lowering pass as the easiest alternative for
PR55266: split all unsupported memory reads into supported reads and a
constructor (and similarly, split writes into bit_field_refs and writes) and
hope that nothing does the reverse transformation.



More information about the Gcc-bugs mailing list