]> granicus.if.org Git - clang/commit
[PPC] support for arithmetic builtins in the FE
authorEhsan Amiri <amehsan@ca.ibm.com>
Thu, 24 Nov 2016 12:40:04 +0000 (12:40 +0000)
committerEhsan Amiri <amehsan@ca.ibm.com>
Thu, 24 Nov 2016 12:40:04 +0000 (12:40 +0000)
commit785e7d6975e413c315b8af0805e847db69d10d63
tree5d93955d096909a092e0628db5d1ab79b213c016
parent1bdc2171708bab7b0162d2ad4d74908a3c6fe789
[PPC] support for arithmetic builtins in the FE

(commit again after fixing the buildbot failures)
This adds various overloads of the following builtins to altivec.h:

    vec_neg
    vec_nabs
    vec_adde
    vec_addec
    vec_sube
    vec_subec
    vec_subc

Note that for vec_sub builtins on 32 bit integers, the semantics is similar to
what ISA describes for instructions like vsubecuq that work on quadwords: the
first operand is added to the one's complement of the second operand. (As
opposed to two's complement which I expected).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287872 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Headers/altivec.h
test/CodeGen/builtins-ppc-altivec.c
test/CodeGen/builtins-ppc-p8vector.c
test/CodeGen/builtins-ppc-quadword.c
test/CodeGen/builtins-ppc-vsx.c