[PowerPC] Make altivec.h work with AIX which has no __int128
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Wed, 24 Mar 2021 05:25:03 +0000 (00:25 -0500)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Wed, 24 Mar 2021 05:35:51 +0000 (00:35 -0500)
commit4020932706f6f8538b48b9b8439a7ec1266a7ae5
tree55e3541e979cfa8623ab7520d8ceb76da5188333
parent85cbfe75afa734b9e141fb11c8fd3c63e815616b
[PowerPC] Make altivec.h work with AIX which has no __int128

There are a number of functions in altivec.h that use
vector __int128 which isn't supported on AIX. Those functions
need to be guarded for targets that don't support the type.
Furthermore, the functions that produce quadword instructions
without using the type need a builtin. This patch adds the
macro guards to altivec.h using the __SIZEOF_INT128__ which
is only defined on targets that support the __int128 type.
clang/include/clang/Basic/BuiltinsPPC.def
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Headers/altivec.h
clang/test/CodeGen/builtins-ppc-quadword-noi128.c [new file with mode: 0644]