This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Boolean Vector, patch 1/5] Introduce boolean vector to be used as a vector comparison type


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.
>>
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]