diff options
author | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2016-11-01 08:39:56 +0000 |
---|---|---|
committer | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2016-11-01 08:39:56 +0000 |
commit | 897e3c968546bf46e4405fb6abd920c4bc017ac7 (patch) | |
tree | baac9400104e9c47dcded5747b279cb446c35550 /test/CodeGen/builtins-ppc-p9vector.c | |
parent | e54c81e47a71edfea335aaed26d52fed2c957c50 (diff) |
[PPC] Add vec_absd functions to altivec.h
This patch corresponds to review https://reviews.llvm.org/D26073.
Committing on behalf of Sean Fertile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/builtins-ppc-p9vector.c')
-rw-r--r-- | test/CodeGen/builtins-ppc-p9vector.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/builtins-ppc-p9vector.c b/test/CodeGen/builtins-ppc-p9vector.c index 1ae4412bf5..5cbdde2341 100644 --- a/test/CodeGen/builtins-ppc-p9vector.c +++ b/test/CodeGen/builtins-ppc-p9vector.c @@ -803,3 +803,19 @@ vector unsigned __int128 test68(void) { // CHECK-NEXT: ret <1 x i128> return vec_parity_lsbb (vsi128a); } + +vector unsigned char test69(void) { +// CHECK-BE: call <16 x i8> @llvm.ppc.altivec.vabsdub(<16 x i8> {{.+}}, <16 x i8> {{.+}}) +// CHECK: call <16 x i8> @llvm.ppc.altivec.vabsdub(<16 x i8> {{.+}}, <16 x i8> {{.+}}) + return vec_absd(vuca, vucb); +} +vector unsigned short test70(void) { +// CHECK-BE: call <8 x i16> @llvm.ppc.altivec.vabsduh(<8 x i16> {{.+}}, <8 x i16> {{.+}}) +// CHECK: call <8 x i16> @llvm.ppc.altivec.vabsduh(<8 x i16> {{.+}}, <8 x i16> {{.+}}) + return vec_absd(vusa, vusb); +} +vector unsigned int test71(void) { +// CHECK-BE: call <4 x i32> @llvm.ppc.altivec.vabsduw(<4 x i32> {{.+}}, <4 x i32> {{.+}}) +// CHECK: call <4 x i32> @llvm.ppc.altivec.vabsduw(<4 x i32> {{.+}}, <4 x i32> {{.+}}) + return vec_absd(vuia, vuib); +} |