This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fast-math optimization question
- From: Steve Ellcey <sellcey at mips dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Thu, 9 Oct 2014 11:32:03 -0700
- Subject: Re: fast-math optimization question
- Authentication-results: sourceware.org; auth=none
- References: <10940e4b-0c5c-4a2a-9432-6385e9590fb4 at BAMAIL02 dot ba dot imgtec dot org> <CA+=Sn1mkOCmPxPmn-RYkE+CJBrQ=8U7O07RUj8wwc6KyuXzrJQ at mail dot gmail dot com>
On Thu, 2014-10-09 at 11:27 -0700, Andrew Pinski wrote:
> > Is there a reason why GCC couldn't (under -ffast-math) call the single
> > precision routines for the first case?
>
> There is no reason why it could not. The reason why it does not
> currently is because there is no pass which does the demotion and the
> only case of demotion that happens is with a simple
> (float)function((double)float_val);
>
> Thanks,
> Andrew
Do you know which pass does the simple
'(float)function((double)float_val)' demotion? Maybe that would be a
good place to extend things.
Steve Ellcey