This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Cc: Christophe Lyon <christophe dot lyon at linaro dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 28 Oct 2015 22:37:16 +0300
- Subject: Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Authentication-results: sourceware.org; auth=none
- References: <20151002135921 dot GE26618 at msticlxl57 dot ims dot intel dot com> <mvmbnbrmcrw dot fsf at hawking dot suse dot de> <CAMbmDYb9MhPrrs+L50XAQA8N_aYvd+TACEQ-BFbRtduPjH7V+g at mail dot gmail dot com> <mvm7fmfmbnv dot fsf at hawking dot suse dot de> <20151022162105 dot GB23452 at msticlxl57 dot ims dot intel dot com> <CAFiYyc3aRo-=kW-qD3xCaCkTVkJ=Zbaq-pZhvAd7XJo=QSpsxg at mail dot gmail dot com> <20151023111240 dot GC23452 at msticlxl57 dot ims dot intel dot com> <CAFiYyc3oG_N-KXcAEYcmKkrogngrLe=4j3ag5Fir_de6uKda3g at mail dot gmail dot com> <CAKdteOY_bHt4cOr-b2UyYpt3n-XvdYz2kW1LdwJv_kR1D0j7zA at mail dot gmail dot com> <1446050893 dot 7184 dot 0 dot camel at oc8801110288 dot ibm dot com>
Seems the problem occurs in this check in expand_vector_operations_1:
/* A scalar operation pretending to be a vector one. */
if (VECTOR_BOOLEAN_TYPE_P (type)
&& !VECTOR_MODE_P (TYPE_MODE (type))
&& TYPE_MODE (type) != BLKmode)
return;
This is to filter out scalar operations on boolean vectors.
The problem here is that TYPE_MODE (type) doesn't return
V4SImode assigned to the type but calls vector_type_mode
instead which tries to find an integer mode for it and returns
TImode. This causes function exit and we don't expand vector
comparison.
Suppose simple option to fix it is to change default get_mask_mode
hook to return BLKmode in case chosen integer vector mode is not
vector_mode_supported_p.
Thanks,
Ilya
2015-10-28 19:48 GMT+03:00 Bill Schmidt <wschmidt@linux.vnet.ibm.com>:
> On Wed, 2015-10-28 at 14:44 +0100, Christophe Lyon wrote:
>> Hi,
>>
>> Since r229128, I see:
>> FAIL: c-c++-common/torture/vector-compare-1.c -O0 execution test
>> on arm targets, such as arm-none-eabi.
>
> Likewise for powerpc64le-linux-gnu. The test produces:
>
> 0 != ((1.000000 > 0.000000 ? -1 : 0) FAIL: c-c++-common/torture/vector-compare-1
> .c -O0 execution test
>
>>
>> Christophe.
>>
>
>
- References:
- [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type
- Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type