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]

Re: problem with zero_extract during gcse


> 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


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