This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] add HFmode to arm_preferred_simd_mode
- From: Kugan <kugan dot vivekanandarajah at linaro dot org>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Ramana Radhakrishnan <ramrad01 at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Sun, 16 Feb 2014 10:15:25 +1100
- Subject: Re: [PATCH][ARM] add HFmode to arm_preferred_simd_mode
- Authentication-results: sourceware.org; auth=none
- References: <52FD6014 dot 8020607 at linaro dot org> <CA+=Sn1=S33zS4aMauWvHiWLx_vx2izvcHzG8WK_2byxcQNM+QQ at mail dot gmail dot com> <52FD8EC1 dot 5050702 at linaro dot org>
On 14/02/14 14:34, Kugan wrote:
>
>
> On 14/02/14 11:24, Andrew Pinski wrote:
>> On Thu, Feb 13, 2014 at 4:15 PM, Kugan
>> <kugan.vivekanandarajah@linaro.org> wrote:
>>> Hi,
>>>
>>> Is there any reason why HFmode is not there in arm_preferred_simd_mode?
>>> NEON does support this.
>>
>> Most likely because there is no support for Half-float in the vectorizer.
>>
>
> I can see that get_vectype_for_scalar_type_and_size failing while
> building vector type (with build_vector_type) for Half-float. I guess we
> should add support there first.
Just for records, I was wrong here. ARM NEON that supports half float
does not support vector arithmetic operations in half float; it supports
vector conversions to float and operate on 32bit. Therefore HFmode is
not really a preferred mode.
And also, gcc vectorizer can support half floats. It is not valid in
this case and hence ARM backend does not provide required patterns and
hooks.
Thanks,
Kugan