mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
add a testcase for the previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139287 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0d76b19919
commit
cbdd2d10ba
47
test/CodeGen/X86/vsel.ll
Normal file
47
test/CodeGen/X86/vsel.ll
Normal file
@ -0,0 +1,47 @@
|
||||
; RUN: llc < %s -march=x86 -promote-elements -mattr=+sse41 | FileCheck %s
|
||||
|
||||
;CHECK: vsel_float
|
||||
;CHECK: blendvps
|
||||
;CHECK: ret
|
||||
define <4 x float> @vsel_float(<4 x float> %v1, <4 x float> %v2) {
|
||||
%vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x float> %v1, <4 x float> %v2
|
||||
ret <4 x float> %vsel
|
||||
}
|
||||
|
||||
|
||||
;CHECK: vsel_i32
|
||||
;CHECK: blendvps
|
||||
;CHECK: ret
|
||||
define <4 x i32> @vsel_i32(<4 x i32> %v1, <4 x i32> %v2) {
|
||||
%vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x i32> %v1, <4 x i32> %v2
|
||||
ret <4 x i32> %vsel
|
||||
}
|
||||
|
||||
|
||||
;CHECK: vsel_double
|
||||
;CHECK: blendvpd
|
||||
;CHECK: ret
|
||||
define <4 x double> @vsel_double(<4 x double> %v1, <4 x double> %v2) {
|
||||
%vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x double> %v1, <4 x double> %v2
|
||||
ret <4 x double> %vsel
|
||||
}
|
||||
|
||||
|
||||
;CHECK: vsel_i64
|
||||
;CHECK: blendvpd
|
||||
;CHECK: ret
|
||||
define <4 x i64> @vsel_i64(<4 x i64> %v1, <4 x i64> %v2) {
|
||||
%vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x i64> %v1, <4 x i64> %v2
|
||||
ret <4 x i64> %vsel
|
||||
}
|
||||
|
||||
|
||||
;CHECK: vsel_i8
|
||||
;CHECK: pblendvb
|
||||
;CHECK: ret
|
||||
define <16 x i8> @vsel_i8(<16 x i8> %v1, <16 x i8> %v2) {
|
||||
%vsel = select <16 x i1> <i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false, i1 true, i1 false, i1 false, i1 false>, <16 x i8> %v1, <16 x i8> %v2
|
||||
ret <16 x i8> %vsel
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user