This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix vector rsqrt discovery (PR tree-optimization/68501)
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Sandiford <richard dot sandiford at arm dot com>,gcc-patches at gcc dot gnu dot org
- Date: Sat, 28 Nov 2015 11:51:13 +0100
- Subject: Re: [PATCH] Fix vector rsqrt discovery (PR tree-optimization/68501)
- Authentication-results: sourceware.org; auth=none
- References: <20151127194056 dot GS5675 at tucnak dot redhat dot com> <E76E4E0B-B802-4822-BE25-5B7078EB4328 at suse dot de> <20151128083840 dot GT5675 at tucnak dot redhat dot com>
On November 28, 2015 9:38:40 AM GMT+01:00, Jakub Jelinek <jakub@redhat.com> wrote:
>On Sat, Nov 28, 2015 at 08:47:18AM +0100, Richard Biener wrote:
>> On November 27, 2015 8:40:56 PM GMT+01:00, Jakub Jelinek
><jakub@redhat.com> wrote:
>> >The recent changes where vector sqrt is represented in the IL using
>> >IFN_SQRT instead of target specific builtins broke the discovery
>> >of vector rsqrt, as targetm.builtin_reciprocal is called only
>> >on builtin functions (not internal functions). Furthermore,
>> >for internal fns, not only the IFN_* is significant, but also the
>> >types (modes actually) of the lhs and/or arguments.
>> >
>> >This patch adjusts the target hook, so that the backends can just
>> >inspect
>> >the call (builtin or internal function), whatever it is.
>> >
>> >Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>>
>> OK. Though the other option would be to add an optab with
>corresponding IFN.
>
>Yeah, I've been thinking about IFN_RSQRT and rsqrt optab, perhaps that
>is
>cleaner and the target hook could go away completely.
That was the idea for this kind of stuff. Not sure if appropriate at this stage.
Richard.
> Jakub