2013-06-25 13:55:52 +00:00
|
|
|
;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck --check-prefix=EG-CHECK %s
|
2013-10-10 17:11:46 +00:00
|
|
|
;RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI-CHECK %s
|
2013-05-03 17:21:31 +00:00
|
|
|
|
2013-06-25 13:55:52 +00:00
|
|
|
;EG-CHECK: @xor_v2i32
|
2013-09-04 19:53:46 +00:00
|
|
|
;EG-CHECK: XOR_INT {{\** *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
|
|
|
|
;EG-CHECK: XOR_INT {{\** *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
|
2013-05-03 17:21:31 +00:00
|
|
|
|
2013-06-25 13:55:52 +00:00
|
|
|
;SI-CHECK: @xor_v2i32
|
2013-11-12 02:35:51 +00:00
|
|
|
;SI-CHECK: V_XOR_B32_e32 v{{[0-9]+, v[0-9]+, v[0-9]+}}
|
|
|
|
;SI-CHECK: V_XOR_B32_e32 v{{[0-9]+, v[0-9]+, v[0-9]+}}
|
2013-06-25 13:55:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
define void @xor_v2i32(<2 x i32> addrspace(1)* %out, <2 x i32> addrspace(1)* %in0, <2 x i32> addrspace(1)* %in1) {
|
|
|
|
%a = load <2 x i32> addrspace(1) * %in0
|
|
|
|
%b = load <2 x i32> addrspace(1) * %in1
|
|
|
|
%result = xor <2 x i32> %a, %b
|
|
|
|
store <2 x i32> %result, <2 x i32> addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
;EG-CHECK: @xor_v4i32
|
2013-09-04 19:53:46 +00:00
|
|
|
;EG-CHECK: XOR_INT {{\** *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
|
|
|
|
;EG-CHECK: XOR_INT {{\** *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
|
|
|
|
;EG-CHECK: XOR_INT {{\** *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
|
|
|
|
;EG-CHECK: XOR_INT {{\** *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}}
|
2013-06-25 13:55:52 +00:00
|
|
|
|
|
|
|
;SI-CHECK: @xor_v4i32
|
2013-11-12 02:35:51 +00:00
|
|
|
;SI-CHECK: V_XOR_B32_e32 {{v[0-9]+, v[0-9]+, v[0-9]+}}
|
|
|
|
;SI-CHECK: V_XOR_B32_e32 {{v[0-9]+, v[0-9]+, v[0-9]+}}
|
|
|
|
;SI-CHECK: V_XOR_B32_e32 {{v[0-9]+, v[0-9]+, v[0-9]+}}
|
|
|
|
;SI-CHECK: V_XOR_B32_e32 {{v[0-9]+, v[0-9]+, v[0-9]+}}
|
2013-06-25 13:55:52 +00:00
|
|
|
|
|
|
|
define void @xor_v4i32(<4 x i32> addrspace(1)* %out, <4 x i32> addrspace(1)* %in0, <4 x i32> addrspace(1)* %in1) {
|
|
|
|
%a = load <4 x i32> addrspace(1) * %in0
|
|
|
|
%b = load <4 x i32> addrspace(1) * %in1
|
2013-05-03 17:21:31 +00:00
|
|
|
%result = xor <4 x i32> %a, %b
|
|
|
|
store <4 x i32> %result, <4 x i32> addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|
2013-08-16 16:19:31 +00:00
|
|
|
|
|
|
|
;EG-CHECK: @xor_i1
|
2013-09-04 19:53:46 +00:00
|
|
|
;EG-CHECK: XOR_INT {{\** *}}T{{[0-9]+\.[XYZW], PV\.[XYZW], PS}}
|
2013-08-16 16:19:31 +00:00
|
|
|
|
|
|
|
;SI-CHECK: @xor_i1
|
2013-11-12 02:35:51 +00:00
|
|
|
;SI-CHECK: S_XOR_B64 s[{{[0-9]+:[0-9]+}}], s[{{[0-9]+:[0-9]+}}], s[{{[0-9]+:[0-9]+}}]
|
2013-08-16 16:19:31 +00:00
|
|
|
|
|
|
|
define void @xor_i1(float addrspace(1)* %out, float addrspace(1)* %in0, float addrspace(1)* %in1) {
|
|
|
|
%a = load float addrspace(1) * %in0
|
|
|
|
%b = load float addrspace(1) * %in1
|
|
|
|
%acmp = fcmp oge float %a, 0.000000e+00
|
|
|
|
%bcmp = fcmp oge float %b, 0.000000e+00
|
|
|
|
%xor = xor i1 %acmp, %bcmp
|
|
|
|
%result = select i1 %xor, float %a, float %b
|
|
|
|
store float %result, float addrspace(1)* %out
|
|
|
|
ret void
|
|
|
|
}
|