[PowerPC] Implement low-order Vector Modulus Builtins, and add Vector Multiply/Divide...
authorAmy Kwan <amy.kwan1@ibm.com>
Tue, 28 Jul 2020 04:45:54 +0000 (23:45 -0500)
committerAmy Kwan <amy.kwan1@ibm.com>
Fri, 31 Jul 2020 15:58:07 +0000 (10:58 -0500)
commitc4e574323210feda1a3988e85fdd93b90a63d1b1
tree9262365cc8264b97315b345e93a5358cb20cbaba
parent7ad6ea520fe49e9320bd15a4daf88e36259efedc
[PowerPC] Implement low-order Vector Modulus Builtins, and add Vector Multiply/Divide/Modulus Builtins Tests

Power10 introduces new instructions for vector multiply, divide and modulus.
These instructions can be exploited by the builtin functions: vec_mul, vec_div,
and vec_mod, respectively.

This patch aims adds the function prototype, vec_mod, as vec_mul and vec_div
been previously implemented in altivec.h.

This patch also adds the following front end tests:
vec_mul for v2i64
vec_div for v4i32 and v2i64
vec_mod for v4i32 and v2i64

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