This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] altivec_resolve_overloaded_builtin fixes (PR target/81622)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 1 Aug 2017 11:04:52 -0500
- Subject: Re: [PATCH, rs6000] altivec_resolve_overloaded_builtin fixes (PR target/81622)
- Authentication-results: sourceware.org; auth=none
- References: <ee053cb8-1618-a869-6cd3-d8be2953d331@linux.vnet.ibm.com> <20170731162727.GT2123@tucnak> <5C58AAD8-0EA9-4051-888F-CF0F48275694@linux.vnet.ibm.com> <20170801064028.GU2123@tucnak>
On Tue, Aug 01, 2017 at 08:40:28AM +0200, Jakub Jelinek wrote:
> Here is the variant patch. In addition to fixing the ICE for vec_ld, for
> vec_st it just moves the premature computation of aligned to the point where
> it is used and that is after we've also verified that the types of the call
> arguments match the builtin argument types, it fixes ICE on vec_cmpne, where
> for -mpower9 it accesses TYPE_MODE (TREE_TYPE (arg0_type)) without checking
> that arg0_type is actually VECTOR_TYPE (if it is e.g. INTEGRAL_TYPE, it will
> segfault) and has some formatting fixes too.
>
> Bootstrapped/regtested on powerpc64{,le}-linux, ok for
> trunk/7.2 (for the latter it applies without the 2 formatting fix hunks
> with while (desc->code && desc->code == fcode &&)?
This is okay. Thanks!
> Note, there is diagnostic message in that routine starting with "Builtin,
> that is something that should be fixed too, GCC diagnostic messages
> (except for Fortran) don't start with a capital letter. But this change
> requires to adjust quite a lot of testcases in gcc.target/powerpc :(.
That is not for 7, then :-)
Segher
> 2017-07-31 Jakub Jelinek <jakub@redhat.com>
>
> PR target/81622
> * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
> __builtin_vec_cmpne verify both arguments are compatible vectors
> before looking at TYPE_MODE on the element type. For __builtin_vec_ld
> verify arg1_type is a pointer or array type. For __builtin_vec_st,
> move computation of aligned to after checking the argument types.
> Formatting fixes.
>
> * gcc.target/powerpc/pr81622.c: New test.