[PowerPC] Provide vec_cmpne on pre-Power9 architectures in altivec.h
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Sat, 5 Sep 2020 01:44:37 +0000 (21:44 -0400)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Sat, 5 Sep 2020 01:48:38 +0000 (21:48 -0400)
commit2d652949be4b772f2c11577621b0ad33052ac844
treef78915b53c1c78fa787aa2e1c9f790a10a58b6f0
parenta5d6af421d625c78bfb0f63830b51863ff0f0877
[PowerPC] Provide vec_cmpne on pre-Power9 architectures in altivec.h

These overloads are listed in appendix A of the ELFv2 ABI specification
without a requirement for ISA 3.0. So these need to be available on
all Altivec-capable architectures. The implementation in altivec.h
erroneously had them guarded for Power9 due to the availability of
the VCMPNE[BHW] instructions. However these need to be implemented
in terms of the VCMPEQ[BHW] instructions on older architectures.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=47423
clang/lib/Headers/altivec.h
clang/test/CodeGen/builtins-ppc-altivec.c