This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: problem with zero_extract during gcse
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Roman Zippel <zippel at linux-m68k dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 6 Sep 2006 18:15:32 +0200
- Subject: Re: problem with zero_extract during gcse
- References: <Pine.LNX.4.64.0608120239000.6761@scrub.home>
> Currently I'm testing the patch below, which simply invalidates the
> load/store. Now I need some help from someone, who is more familiar with
> this code, whether this is the correct approach.
I don't see any other solution than invalidating the MEM.
> Index: gcc/gcse.c
> ===================================================================
> --- gcc/gcse.c (revision 116085)
> +++ gcc/gcse.c (working copy)
> @@ -5319,6 +5319,16 @@
> else
> ptr->invalid = 1;
> }
> + else if (GET_CODE (dest) == ZERO_EXTRACT)
> + {
> + dest = XEXP (dest, 0);
> + if (MEM_P (dest) && simple_mem (dest))
> + {
> + ptr = ldst_entry (dest);
> + ptr->invalid = 1;
> + }
> +
> + }
> }
> else
> invalidate_any_buried_refs (PATTERN (insn));
Why not simply mimicing the "load" case and calling invalidate_any_buried_refs
on DEST, with a comment mentioning the (ZERO_EXTRACT (MEM)) corner case?
--
Eric Botcazou