mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
This change implements the following three logical vector operations:
veqv (vector equivalence) vnand vorc I increased the AddedComplexity for these instructions to 500 to ensure they are generated instead of issuing other VSX instructions. Phabricator review: http://reviews.llvm.org/D7469 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
27
test/CodeGen/PowerPC/vec_veqv_vnand_vorc.ll
Normal file
27
test/CodeGen/PowerPC/vec_veqv_vnand_vorc.ll
Normal file
@@ -0,0 +1,27 @@
|
||||
; Check the miscellaneous logical vector operations added in 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
|
||||
; Test x eqv y
|
||||
define <4 x i32> @test_veqv(<4 x i32> %x, <4 x i32> %y) nounwind {
|
||||
%tmp = xor <4 x i32> %x, %y
|
||||
%ret_val = xor <4 x i32> %tmp, < i32 -1, i32 -1, i32 -1, i32 -1>
|
||||
ret <4 x i32> %ret_val
|
||||
; CHECK: veqv 2, 2, 3
|
||||
}
|
||||
|
||||
; Test x vnand y
|
||||
define <4 x i32> @test_vnand(<4 x i32> %x, <4 x i32> %y) nounwind {
|
||||
%tmp = and <4 x i32> %x, %y
|
||||
%ret_val = xor <4 x i32> %tmp, <i32 -1, i32 -1, i32 -1, i32 -1>
|
||||
ret <4 x i32> %ret_val
|
||||
; CHECK: vnand 2, 2, 3
|
||||
}
|
||||
|
||||
; Test x vorc y
|
||||
define <4 x i32> @test_vorc(<4 x i32> %x, <4 x i32> %y) nounwind {
|
||||
%tmp = xor <4 x i32> %y, <i32 -1, i32 -1, i32 -1, i32 -1>
|
||||
%ret_val = or <4 x i32> %x, %tmp
|
||||
ret <4 x i32> %ret_val
|
||||
; CHECK: vorc 2, 2, 3
|
||||
}
|
||||
Reference in New Issue
Block a user