This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix rs6000 stve* patterns (PR target/41082)
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- Date: Wed, 8 Dec 2010 22:10:58 -0500
- Subject: Re: [PATCH] Fix rs6000 stve* patterns (PR target/41082)
- References: <20101208210050.GH29412@tyan-ft48-01.lab.bos.redhat.com>
On Wed, Dec 8, 2010 at 4:00 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> The where_2.f90 testcase is miscompiled on ppc64-darwin with -O3 -m64
> -mtune=power4. ?The problem is in the altivec_stve* patterns, which
> is represented as a V4SI mode store to MEM, but with offset already
> adjusted, so e.g. DSE can believe memory after the end of the V4SI mode
> temp is killed by the store.
>
> Fixed by not using stve*x at all in rs6000_expand_vector_extract
> (the temp slot is uninitialized and nothing ever looks at the other bytes,
> so there is no point in avoiding storing other bytes - stvx should work
> fine) and adjusting the patterns for the vec_stve* intrinsics so that
> it represents what the insn actually does - stores only one scalar instead
> of the whole vector.
>
> Michael has bootstrapped/regtested this patch on power7. ?Ok for trunk?
>
> 2010-12-08 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?PR target/41082
> ? ? ? ?* config/rs6000/rs6000.c (rs6000_expand_vector_extract): Use stvx
> ? ? ? ?instead of stve*x.
> ? ? ? ?(altivec_expand_stv_builtin): For op0 use mode of operand 1 instead
> ? ? ? ?of operand 0.
> ? ? ? ?* config/rs6000/altivec.md (VI_scalar): New mode attr.
> ? ? ? ?(altivec_stve<VI_char>x, *altivec_stvesfx): Use scalar instead of
> ? ? ? ?vector mode for operand 0, put operand 1 into UNSPEC.
Okay.
Thanks, David