[PowerPC][Power10] Implement Count Leading/Trailing Zeroes Builtins under bit Mask...
authorAmy Kwan <amy.kwan1@ibm.com>
Wed, 24 Jun 2020 20:23:17 +0000 (15:23 -0500)
committerAmy Kwan <amy.kwan1@ibm.com>
Wed, 24 Jun 2020 21:03:45 +0000 (16:03 -0500)
commitd82f26cc4bc7cb78f7ef327fa43a93e3d0ff9706
tree2fbc9868d1fddc9d2d3df91bcc8b65fd9dc87047
parent0cd9e598291df8c633aaa0c0e1d8eeab95de9680
[PowerPC][Power10] Implement Count Leading/Trailing Zeroes Builtins under bit Mask in LLVM/Clang

This patch implements builtins for the following prototypes:

unsigned long long __builtin_cntlzdm (unsigned long long, unsigned long long)
unsigned long long __builtin_cnttzdm (unsigned long long, unsigned long long)
vector unsigned long long vec_cntlzm (vector unsigned long long, vector unsigned long long)
vector unsigned long long vec_cnttzm (vector unsigned long long, vector unsigned long long)

Differential Revision: https://reviews.llvm.org/D80941
clang/include/clang/Basic/BuiltinsPPC.def
clang/lib/Headers/altivec.h
clang/test/CodeGen/builtins-ppc-p10.c
clang/test/CodeGen/builtins-ppc-p10vector.c
llvm/include/llvm/IR/IntrinsicsPowerPC.td
llvm/lib/Target/PowerPC/PPCInstrPrefix.td
llvm/test/CodeGen/PowerPC/p10-bit-manip-ops.ll
llvm/test/MC/Disassembler/PowerPC/p10insts.txt
llvm/test/MC/PowerPC/p10.s