diff options
| author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2014-11-14 12:10:51 +0000 |
|---|---|---|
| committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2014-11-14 12:10:51 +0000 |
| commit | cee13a2712c3ac3134791f951157011411e798d8 (patch) | |
| tree | bfdad785097e6db87808784241cb55c1a2a85e2d /clang/lib | |
| parent | 76746929611423cc2788b6c4e8251a4e94063c08 (diff) | |
| download | bcm5719-llvm-cee13a2712c3ac3134791f951157011411e798d8.tar.gz bcm5719-llvm-cee13a2712c3ac3134791f951157011411e798d8.zip | |
[PowerPC] Add VSX builtins for vec_div
This patch adds builtin support for xvdivdp and xvdivsp, along with a
new test case. The builtins are accessed using vec_div in altivec.h.
Builtins are listed (mostly) alphabetically there, so inserting these
changed the line numbers for deprecation warnings tested in
test/Headers/altivec-intrin.c.
There is a companion patch for LLVM.
llvm-svn: 221984
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Headers/altivec.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/Headers/altivec.h b/clang/lib/Headers/altivec.h index 6e33091db2f..5e27a8327b4 100644 --- a/clang/lib/Headers/altivec.h +++ b/clang/lib/Headers/altivec.h @@ -1623,6 +1623,21 @@ vec_vctuxs(vector float __a, int __b) return __builtin_altivec_vctuxs(__a, __b); } +/* vec_div */ +#ifdef __VSX__ +static vector float __ATTRS_o_ai +vec_div(vector float __a, vector float __b) +{ + return __builtin_vsx_xvdivsp(__a, __b); +} + +static vector double __ATTRS_o_ai +vec_div(vector double __a, vector double __b) +{ + return __builtin_vsx_xvdivdp(__a, __b); +} +#endif + /* vec_dss */ static void __attribute__((__always_inline__)) |

