diff options
author | Ehsan Amiri <amehsan@ca.ibm.com> | 2016-11-18 11:05:55 +0000 |
---|---|---|
committer | Ehsan Amiri <amehsan@ca.ibm.com> | 2016-11-18 11:05:55 +0000 |
commit | ff0942e6ea3111792bc2fbf3d2bbdc7c74937ce5 (patch) | |
tree | 241fa35fbe1ab981101a684b2dcd3731e45eb386 /llvm/test/CodeGen/PowerPC | |
parent | e995a8088df3798762dcff9fa4008a3c342c54de (diff) | |
download | bcm5719-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.ll | 22 |
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(...) |