1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
3 ;; This test checks SYCL relational builtin any and all with vector input types.
5 ; CHECK-SPIRV: %[[#BoolTypeID:]] = OpTypeBool
7 ; CHECK-SPIRV: OpAny %[[#BoolTypeID]]
8 ; CHECK-SPIRV: OpAny %[[#BoolTypeID]]
9 ; CHECK-SPIRV: OpAny %[[#BoolTypeID]]
10 ; CHECK-SPIRV: OpAny %[[#BoolTypeID]]
11 ; CHECK-SPIRV: OpAll %[[#BoolTypeID]]
12 ; CHECK-SPIRV: OpAll %[[#BoolTypeID]]
13 ; CHECK-SPIRV: OpAll %[[#BoolTypeID]]
14 ; CHECK-SPIRV: OpAll %[[#BoolTypeID]]
16 define dso_local spir_func void @test_vector(i32 addrspace(4)* nocapture writeonly %out, <2 x i8> %c, <2 x i16> %s, <2 x i32> %i, <2 x i64> %l) local_unnamed_addr {
18 %call = tail call spir_func i32 @_Z3anyDv2_c(<2 x i8> %c)
19 %call1 = tail call spir_func i32 @_Z3anyDv2_s(<2 x i16> %s)
20 %add = add nsw i32 %call1, %call
21 %call2 = tail call spir_func i32 @_Z3anyDv2_i(<2 x i32> %i)
22 %add3 = add nsw i32 %add, %call2
23 %call4 = tail call spir_func i32 @_Z3anyDv2_l(<2 x i64> %l)
24 %add5 = add nsw i32 %add3, %call4
25 %call6 = tail call spir_func i32 @_Z3allDv2_c(<2 x i8> %c)
26 %add7 = add nsw i32 %add5, %call6
27 %call8 = tail call spir_func i32 @_Z3allDv2_s(<2 x i16> %s)
28 %add9 = add nsw i32 %add7, %call8
29 %call10 = tail call spir_func i32 @_Z3allDv2_i(<2 x i32> %i)
30 %add11 = add nsw i32 %add9, %call10
31 %call12 = tail call spir_func i32 @_Z3allDv2_l(<2 x i64> %l)
32 %add13 = add nsw i32 %add11, %call12
33 store i32 %add13, i32 addrspace(4)* %out, align 4
37 declare spir_func i32 @_Z3anyDv2_c(<2 x i8>) local_unnamed_addr
39 declare spir_func i32 @_Z3anyDv2_s(<2 x i16>) local_unnamed_addr
41 declare spir_func i32 @_Z3anyDv2_i(<2 x i32>) local_unnamed_addr
43 declare spir_func i32 @_Z3anyDv2_l(<2 x i64>) local_unnamed_addr
45 declare spir_func i32 @_Z3allDv2_c(<2 x i8>) local_unnamed_addr
47 declare spir_func i32 @_Z3allDv2_s(<2 x i16>) local_unnamed_addr
49 declare spir_func i32 @_Z3allDv2_i(<2 x i32>) local_unnamed_addr
51 declare spir_func i32 @_Z3allDv2_l(<2 x i64>) local_unnamed_addr