diff options
author | Tony Jiang <jtony@ca.ibm.com> | 2017-05-24 15:54:13 +0000 |
---|---|---|
committer | Tony Jiang <jtony@ca.ibm.com> | 2017-05-24 15:54:13 +0000 |
commit | 9aa2c0383dfc0d49458f6043ed604f7a75a32479 (patch) | |
tree | 3be82bccacaffeb294a5653e03f407584baf33ae /clang/test/CodeGen/builtins-ppc-error.c | |
parent | dc62b80c823d8e794cac35572dbd29852a1941fd (diff) | |
download | bcm5719-llvm-9aa2c0383dfc0d49458f6043ed604f7a75a32479.tar.gz bcm5719-llvm-9aa2c0383dfc0d49458f6043ed604f7a75a32479.zip |
[PowerPC] Implement vec_xxsldwi builtin.
The vec_xxsldwi builtin is missing from altivec.h. This has been requested by
developers working on libvpx for VP9 support for Google.
The patch fixes PR: https://bugs.llvm.org/show_bug.cgi?id=32653
Differential Revision: https://reviews.llvm.org/D33236
llvm-svn: 303766
Diffstat (limited to 'clang/test/CodeGen/builtins-ppc-error.c')
-rw-r--r-- | clang/test/CodeGen/builtins-ppc-error.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtins-ppc-error.c b/clang/test/CodeGen/builtins-ppc-error.c index 67730dca9f5..c3d6e639d82 100644 --- a/clang/test/CodeGen/builtins-ppc-error.c +++ b/clang/test/CodeGen/builtins-ppc-error.c @@ -26,3 +26,11 @@ void testXXPERMDI(int index) { vec_xxpermdi(1, 2, 3); //expected-error {{first two arguments to '__builtin_vsx_xxpermdi' must be vectors}} vec_xxpermdi(vsi, vuc, 2); //expected-error {{first two arguments to '__builtin_vsx_xxpermdi' must have the same type}} } + +void testXXSLDWI(int index) { + vec_xxsldwi(vsi); //expected-error {{too few arguments to function call, expected at least 3, have 1}} + vec_xxsldwi(vsi, vsi, 2, 4); //expected-error {{too many arguments to function call, expected at most 3, have 4}} + vec_xxsldwi(vsi, vsi, index); //expected-error {{argument 3 to '__builtin_vsx_xxsldwi' must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)}} + vec_xxsldwi(1, 2, 3); //expected-error {{first two arguments to '__builtin_vsx_xxsldwi' must be vectors}} + vec_xxsldwi(vsi, vuc, 2); //expected-error {{first two arguments to '__builtin_vsx_xxsldwi' must have the same type}} +} |