1 ; RUN: llvm-as %s -o %t.bc 2 ; RUN: llvm-spirv %t.bc -spirv-text -o %t.txt 3 ; RUN: FileCheck < %t.txt %s --check-prefix=CHECK-SPIRV 4 ; RUN: llvm-spirv %t.bc -o %t.spv 5 ; RUN: llvm-spirv -r %t.spv -o %t.rev.bc 6 ; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM 7 8 ; CHECK-LLVM: call spir_func i32 @_Z3allDv2_i( 9 ; CHECK-LLVM: call spir_func i32 @_Z3anyDv2_i( 10 11 ; CHECK-SPIRV: 2 TypeBool [[BoolTypeID:[0-9]+]] 12 ; CHECK-SPIRV: 4 All [[BoolTypeID]] 13 ; CHECK-SPIRV: 4 Any [[BoolTypeID]] 14 15 target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024" 16 target triple = "spir-unknown-unknown" 17 18 ; Function Attrs: nounwind 19 define spir_kernel void @testKernel() #0 { 20 entry: 21 %cmp = icmp ne <2 x i64> zeroinitializer, <i64 1, i64 1> 22 %sext = sext <2 x i1> %cmp to <2 x i64> 23 %call = call spir_func i32 @_Z3allDv2_l(<2 x i64> %sext) 24 %0 = insertelement <2 x i64> <i64 1, i64 1>, i64 0, i32 0 25 %cmp1 = icmp ne <2 x i64> zeroinitializer, %0 26 %sext2 = sext <2 x i1> %cmp1 to <2 x i64> 27 %call3 = call spir_func i32 @_Z3anyDv2_l(<2 x i64> %sext2) 28 ret void 29 } 30 31 declare spir_func i32 @_Z3allDv2_l(<2 x i64>) #1 32 33 declare spir_func i32 @_Z3anyDv2_l(<2 x i64>) #1 34 35 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 36 attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 37 38 !opencl.kernels = !{!0} 39 !opencl.enable.FP_CONTRACT = !{} 40 !opencl.spir.version = !{!6} 41 !opencl.ocl.version = !{!7} 42 !opencl.used.extensions = !{!8} 43 !opencl.used.optional.core.features = !{!8} 44 !opencl.compiler.options = !{!8} 45 46 !0 = !{void ()* @testKernel, !1, !2, !3, !4, !5} 47 !1 = !{!"kernel_arg_addr_space"} 48 !2 = !{!"kernel_arg_access_qual"} 49 !3 = !{!"kernel_arg_type"} 50 !4 = !{!"kernel_arg_base_type"} 51 !5 = !{!"kernel_arg_type_qual"} 52 !6 = !{i32 1, i32 2} 53 !7 = !{i32 2, i32 0} 54 !8 = !{} 55