This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ARM] Fix CLZ_DEFINED_VALUE_AT_ZERO for vector modes
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Michael Collison <michael dot collison at linaro dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 9 Oct 2014 00:11:02 -0700
- Subject: Re: [ARM] Fix CLZ_DEFINED_VALUE_AT_ZERO for vector modes
- Authentication-results: sourceware.org; auth=none
- References: <543633BD dot 9030004 at linaro dot org>
On Thu, Oct 9, 2014 at 12:05 AM, Michael Collison
<michael.collison@linaro.org> wrote:
>
> The CLZ_DEFINED_VALUE_AT_ZERO macro is harded to return 32. For the vector
> intrinsic vclz this is incorrect and should return the value eight. The
> CTZ_DEFINED_VALUE_AT_ZERO has the same issue.
Do you have a testcase? I almost think you should have a testcase
which causes the constant folding. Though I don't think there is
constant folding of the vector clz/ctz happening.
Thanks,
Andrew
>
> Tested on arm-linux-gnueabihf, arm-linux-gnueabi.
>
> 2014-10-08 Michael Collison <michael.collison@linaro.com>
>
> * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
> to support vector modes
> (CTZ_DEFINED_VALUE_AT_ZERO): Ditto
>
> --
> Michael Collison
> Linaro Toolchain Working Group
> michael.collison@linaro.org
>