It should return a vector of integers. The GCC documentation is pretty clear:
Vector comparison is supported with standard comparison operators: ==, !=, <, <=, >, >=. Comparison operands can be vector expressions of integer-type or real-type. Comparison between integer-type vectors and real-type vectors are not supported. The result of the comparison is a vector of the same width and number of elements as the comparison operands with a signed integral element type.
Note the last sentence.
GCC and clang both return the expected result, but ICC has other ideas and I end up with 1 << 31 instead of -1 for true.
Luckily the workaround is pretty straightforward: an explicit cast to the correct type.
TCE Level:
TCE Open Date:
Sunday, January 19, 2020 - 15:43