summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/vec_minmax.ll
diff options
context:
space:
mode:
authorKit Barton <kbarton@ca.ibm.com>2015-03-03 19:55:45 +0000
committerKit Barton <kbarton@ca.ibm.com>2015-03-03 19:55:45 +0000
commit0cfa7b7ad035cd349be419b8601748bfcb1edf1b (patch)
tree72c9cbc1f3a1cea152cd4a34c89f613fa35f761d /llvm/test/CodeGen/PowerPC/vec_minmax.ll
parente4080e7f2ab886dbe3c03777e1573be66c8bb07a (diff)
downloadbcm5719-llvm-0cfa7b7ad035cd349be419b8601748bfcb1edf1b.tar.gz
bcm5719-llvm-0cfa7b7ad035cd349be419b8601748bfcb1edf1b.zip
Add the following 64-bit vector integer arithmetic instructions added in POWER8:
vaddudm vsubudm vmulesw vmulosw vmuleuw vmulouw vmuluwm vmaxsd vmaxud vminsd vminud vcmpequd vcmpequd. vcmpgtsd vcmpgtsd. vcmpgtud vcmpgtud. vrld vsld vsrd vsrad Phabricator review: http://reviews.llvm.org/D7959 llvm-svn: 231115
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/vec_minmax.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/vec_minmax.ll34
1 files changed, 34 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/vec_minmax.ll b/llvm/test/CodeGen/PowerPC/vec_minmax.ll
new file mode 100644
index 00000000000..e9ba6a01a9b
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/vec_minmax.ll
@@ -0,0 +1,34 @@
+; Test the vector min/max doubleword instructions added for P8
+; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 < %s | FileCheck %s
+; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s
+
+declare <2 x i64> @llvm.ppc.altivec.vmaxsd(<2 x i64>, <2 x i64>) nounwind readnone
+declare <2 x i64> @llvm.ppc.altivec.vmaxud(<2 x i64>, <2 x i64>) nounwind readnone
+declare <2 x i64> @llvm.ppc.altivec.vminsd(<2 x i64>, <2 x i64>) nounwind readnone
+declare <2 x i64> @llvm.ppc.altivec.vminud(<2 x i64>, <2 x i64>) nounwind readnone
+
+define <2 x i64> @test_vmaxsd(<2 x i64> %x, <2 x i64> %y) {
+ %tmp = tail call <2 x i64> @llvm.ppc.altivec.vmaxsd(<2 x i64> %x, <2 x i64> %y)
+ ret <2 x i64> %tmp
+; CHECK: vmaxsd 2, 2, 3
+}
+
+define <2 x i64> @test_vmaxud(<2 x i64> %x, <2 x i64> %y) {
+ %tmp = tail call <2 x i64> @llvm.ppc.altivec.vmaxud(<2 x i64> %x, <2 x i64> %y)
+ ret <2 x i64> %tmp
+; CHECK: vmaxud 2, 2, 3
+}
+
+define <2 x i64> @test_vminsd(<2 x i64> %x, <2 x i64> %y) {
+ %tmp = tail call <2 x i64> @llvm.ppc.altivec.vminsd(<2 x i64> %x, <2 x i64> %y)
+ ret <2 x i64> %tmp
+; CHECK: vminsd 2, 2, 3
+}
+
+define <2 x i64> @test_vminud(<2 x i64> %x, <2 x i64> %y) {
+ %tmp = tail call <2 x i64> @llvm.ppc.altivec.vminud(<2 x i64> %x, <2 x i64> %y)
+ ret <2 x i64> %tmp
+; CHECK: vminud 2, 2, 3
+}
+
+
OpenPOWER on IntegriCloud