This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [70/77] Make expand_fix/float check for scalar modes
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Thu, 24 Aug 2017 23:00:06 -0600
- Subject: Re: [70/77] Make expand_fix/float check for scalar modes
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 481F581DFD
- References: <8760ewohsv.fsf@linaro.org> <87r2xkbtes.fsf@linaro.org>
On 07/13/2017 03:03 AM, Richard Sandiford wrote:
> The expand_float code:
>
> /* Unsigned integer, and no way to convert directly. Convert as signed,
> then unconditionally adjust the result. */
>
> and the expand_fix code:
>
> /* For an unsigned conversion, there is one more way to do it.
> If we have a signed conversion, we generate code that compares
> the real value to the largest representable positive number. If if
> is smaller, the conversion is done normally. Otherwise, subtract
> one plus the highest signed number, convert, and add it back.
>
> are restricted to scalars, since the expansion branches on a
> comparison of the value. This patch makes that explicit.
>
> 2017-07-13 Richard Sandiford <richard.sandiford@linaro.org>
> Alan Hayward <alan.hayward@arm.com>
> David Sherwood <david.sherwood@arm.com>
>
> gcc/
> * optabs.c (expand_float): Explicitly check for scalars before
> using a branching expansion.
> (expand_fix): Likewise.
OK.
jeff