[Altivec] Use signed comparison for vec_all_* and vec_any_* interfaces
authorBardia Mahjour <bmahjour@ca.ibm.com>
Mon, 12 Jul 2021 15:41:16 +0000 (11:41 -0400)
committerBardia Mahjour <bmahjour@ca.ibm.com>
Mon, 12 Jul 2021 15:41:16 +0000 (11:41 -0400)
commit2071ce9d4559d444a065d78248a7381bf121b766
treec6f058a43ef50ff048bac99d8b06d2b34da9f69b
parent11b47c103a36371576711cae1f7527c26f78efb5
[Altivec] Use signed comparison for vec_all_* and vec_any_* interfaces

We are currently being inconsistent in using signed vs unsigned comparisons for
vec_all_* and vec_any_* interfaces that use vector bool types. For example we
use signed comparison for vec_all_ge(vector signed char, vector bool char) but
unsigned comparison for when the arguments are swapped. GCC and XL use signed
comparison instead. This patch makes clang consistent with itself and with XL
and GCC.

Reviewed By: nemanjai

Differential Revision: https://reviews.llvm.org/D105666
clang/lib/Headers/altivec.h
clang/test/CodeGen/builtins-ppc-altivec.c
clang/test/CodeGen/builtins-ppc-vsx.c