2011-10-19 22:43:16 +02:00
|
|
|
; RUN: llc < %s -march=x86 -mcpu=yonah -mattr=+sse2,-sse41 | FileCheck %s
|
2011-09-13 21:17:42 +02:00
|
|
|
|
2011-10-19 22:43:16 +02:00
|
|
|
; CHECK: vsel_float
|
|
|
|
; CHECK: pandn
|
|
|
|
; CHECK: pand
|
|
|
|
; CHECK: por
|
|
|
|
; CHECK: ret
|
2011-09-13 21:17:42 +02:00
|
|
|
define void@vsel_float(<4 x float>* %v1, <4 x float>* %v2) {
|
|
|
|
%A = load <4 x float>* %v1
|
|
|
|
%B = load <4 x float>* %v2
|
|
|
|
%vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x float> %A, <4 x float> %B
|
|
|
|
store <4 x float > %vsel, <4 x float>* %v1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2011-10-19 22:43:16 +02:00
|
|
|
; CHECK: vsel_i32
|
|
|
|
; CHECK: pandn
|
|
|
|
; CHECK: pand
|
|
|
|
; CHECK: por
|
|
|
|
; CHECK: ret
|
2011-09-13 21:17:42 +02:00
|
|
|
define void@vsel_i32(<4 x i32>* %v1, <4 x i32>* %v2) {
|
|
|
|
%A = load <4 x i32>* %v1
|
|
|
|
%B = load <4 x i32>* %v2
|
|
|
|
%vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x i32> %A, <4 x i32> %B
|
|
|
|
store <4 x i32 > %vsel, <4 x i32>* %v1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2011-11-08 00:08:21 +01:00
|
|
|
; Without forcing instructions, fall back to the preferred PS domain.
|
2011-09-13 21:59:18 +02:00
|
|
|
; CHECK: vsel_i64
|
2012-01-03 23:19:42 +01:00
|
|
|
; CHECK: xorps
|
|
|
|
; CHECK: andps
|
|
|
|
; CHECK: andnps
|
|
|
|
; CHECK: orps
|
2011-09-13 21:59:18 +02:00
|
|
|
; CHECK: ret
|
2011-09-13 21:17:42 +02:00
|
|
|
|
|
|
|
define void@vsel_i64(<4 x i64>* %v1, <4 x i64>* %v2) {
|
|
|
|
%A = load <4 x i64>* %v1
|
|
|
|
%B = load <4 x i64>* %v2
|
|
|
|
%vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x i64> %A, <4 x i64> %B
|
|
|
|
store <4 x i64 > %vsel, <4 x i64>* %v1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2011-11-08 00:08:21 +01:00
|
|
|
; Without forcing instructions, fall back to the preferred PS domain.
|
2011-09-13 21:59:18 +02:00
|
|
|
; CHECK: vsel_double
|
2012-01-03 23:19:42 +01:00
|
|
|
; CHECK: xorps
|
|
|
|
; CHECK: andps
|
|
|
|
; CHECK: andnps
|
|
|
|
; CHECK: orps
|
2011-09-13 21:59:18 +02:00
|
|
|
; CHECK: ret
|
|
|
|
|
2011-09-13 21:17:42 +02:00
|
|
|
define void@vsel_double(<4 x double>* %v1, <4 x double>* %v2) {
|
|
|
|
%A = load <4 x double>* %v1
|
|
|
|
%B = load <4 x double>* %v2
|
|
|
|
%vsel = select <4 x i1> <i1 true, i1 false, i1 false, i1 false>, <4 x double> %A, <4 x double> %B
|
|
|
|
store <4 x double > %vsel, <4 x double>* %v1
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
|