This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Bad MEM_SIZE for cmpmem causes wrong scheduling
- From: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: rth at redhat dot com (Richard Henderson)
- Cc: weigand at i1 dot informatik dot uni-erlangen dot de (Ulrich Weigand), gcc-patches at gcc dot gnu dot org
- Date: Sat, 25 Sep 2004 21:52:51 +0200 (CEST)
- Subject: 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