summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorEhsan Amiri <amehsan@ca.ibm.com>2016-11-18 11:05:55 +0000
committerEhsan Amiri <amehsan@ca.ibm.com>2016-11-18 11:05:55 +0000
commitff0942e6ea3111792bc2fbf3d2bbdc7c74937ce5 (patch)
tree241fa35fbe1ab981101a684b2dcd3731e45eb386 /llvm/test/CodeGen/PowerPC
parente995a8088df3798762dcff9fa4008a3c342c54de (diff)
downloadbcm5719-llvm-ff0942e6ea3111792bc2fbf3d2bbdc7c74937ce5.tar.gz
bcm5719-llvm-ff0942e6ea3111792bc2fbf3d2bbdc7c74937ce5.zip
[Power9] Add patterns for vnegd, vnegw
Exploit new instructions by adding patterns to .td file. https://reviews.llvm.org/D26551 llvm-svn: 287334
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
-rw-r--r--llvm/test/CodeGen/PowerPC/vsx-p9.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/vsx-p9.ll b/llvm/test/CodeGen/PowerPC/vsx-p9.ll
index b0c6e851353..e8a0a3bcf92 100644
--- a/llvm/test/CodeGen/PowerPC/vsx-p9.ll
+++ b/llvm/test/CodeGen/PowerPC/vsx-p9.ll
@@ -388,4 +388,26 @@ entry:
; Function Attrs: nounwind readnone
declare void @llvm.ppc.vsx.stxvll(<4 x i32>, i8*, i64)
+define <4 x i32> @test0(<4 x i32> %a) local_unnamed_addr #0 {
+entry:
+ %sub.i = sub <4 x i32> zeroinitializer, %a
+ ret <4 x i32> %sub.i
+
+; CHECK-LABEL: @test0
+; CHECK: vnegw 2, 2
+; CHECK: blr
+
+}
+
+define <2 x i64> @test1(<2 x i64> %a) local_unnamed_addr #0 {
+entry:
+ %sub.i = sub <2 x i64> zeroinitializer, %a
+ ret <2 x i64> %sub.i
+
+; CHECK-LABEL: @test1
+; CHECK: vnegd 2, 2
+; CHECK: blr
+
+}
+
declare void @sink(...)
OpenPOWER on IntegriCloud