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: gcc-patches at gcc dot gnu dot org, richard dot sandiford at arm dot com
- Date: Mon, 30 Nov 2015 15:53:02 +0100 (CET)
- 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> <20151130141209 dot GD5675 at tucnak dot redhat dot com> <87a8pvef0z dot fsf at e105548-lin dot cambridge dot arm dot com> <20151130143644 dot GE5675 at tucnak dot redhat dot com>
On Mon, 30 Nov 2015, Jakub Jelinek wrote:
> On Mon, Nov 30, 2015 at 02:30:04PM +0000, Richard Sandiford wrote:
> > > keep the builtin_reciprocal hook (perhaps renamed to builtin_rsqrt)
> > > for the purpose of this condition and nothing else (i.e. return a
> > > boolean) and let the rest be determined from the optab, just commit
> > > the already posted patch, something else?
> >
> > ...I suppose the problem with adding extra conditions to the expander
> > is that it would break cases where the expander is used for target
> > built-ins too.
> >
> > Maybe optabs shouldn't be used for built-ins if the usage conditions
> > aren't the same. But if that's fighting too much against existing usage,
> > the hook "hack" could check these conditions too.
>
> Yeah, I'm aware that the target builtins use those expanders with the
> current conditions and so would need to be renamed to something different
> if we take the approach of adding the conditions to all rsqrt* expanders.
>
> So, maybe it is best if I just apply my original patch right away so that
> the bug is fixed and we can continue discussions on how we want to handle
> it.
Yes, I've seen the IFN idea as a followup improvement and go with
your original patch for now.
Richard.