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: [PATCH] Bad MEM_SIZE for cmpmem causes wrong scheduling


Richard Henderson wrote:
> 
> On Sat, Sep 25, 2004 at 02:44:48AM +0200, Ulrich Weigand wrote:
> >   if (TREE_CODE (exp) == ADDR_EXPR)
> >     exp = TREE_OPERAND (exp, 0);
> >   else

  else if (POINTER_TYPE_P (TREE_TYPE (exp)))

> >     exp = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (exp)), exp);
> >   else
> >     exp = NULL;
> > 
> >   /* Honor attributes derived from exp, except for the alias set
> >      (as builtin stringops may alias with anything) and the size
> >      (as stringops may access multiple array elements).  */
> >   if (exp)
> >     {
> >       set_mem_attributes (mem, exp, 0);
> >       set_mem_alias_set (mem, 0);
> >       set_mem_size (mem, NULL_RTX);
> >     }
> 
> Too many else's, and exp is never null, but that seems ok.  We do
> still get MEM_ALIGN set for the INDIRECT_REF side, which is good.

See above for the missing else condition (copied from the current
code) ...

I'll test that change and see what we get.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


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