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] Fix rs6000 stve* patterns (PR target/41082)


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


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