Re-land [openmp] Fix warnings when building on Windows with latest MSVC or Clang...
[llvm-project.git] / llvm / test / CodeGen / SPIRV / transcoding / clk_event_t.ll
blob9054454879cc26f8e03579ae3b9a77f4593394ec
1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
3 ; CHECK-SPIRV: OpTypeDeviceEvent
4 ; CHECK-SPIRV: OpFunction
5 ; CHECK-SPIRV: OpCreateUserEvent
6 ; CHECK-SPIRV: OpIsValidEvent
7 ; CHECK-SPIRV: OpRetainEvent
8 ; CHECK-SPIRV: OpSetUserEventStatus
9 ; CHECK-SPIRV: OpCaptureEventProfilingInfo
10 ; CHECK-SPIRV: OpReleaseEvent
11 ; CHECK-SPIRV: OpFunctionEnd
13 ;; kernel void clk_event_t_test(global int *res, global void *prof) {
14 ;;   clk_event_t e1 = create_user_event();
15 ;;   *res = is_valid_event(e1);
16 ;;   retain_event(e1);
17 ;;   set_user_event_status(e1, -42);
18 ;;   capture_event_profiling_info(e1, CLK_PROFILING_COMMAND_EXEC_TIME, prof);
19 ;;   release_event(e1);
20 ;; }
22 define dso_local spir_kernel void @clk_event_t_test(i32 addrspace(1)* nocapture noundef writeonly %res, i8 addrspace(1)* noundef %prof) local_unnamed_addr {
23 entry:
24   %call = call spir_func target("spirv.DeviceEvent") @_Z17create_user_eventv()
25   %call1 = call spir_func zeroext i1 @_Z14is_valid_event12ocl_clkevent(target("spirv.DeviceEvent") %call)
26   %conv = zext i1 %call1 to i32
27   store i32 %conv, i32 addrspace(1)* %res, align 4
28   call spir_func void @_Z12retain_event12ocl_clkevent(target("spirv.DeviceEvent") %call)
29   call spir_func void @_Z21set_user_event_status12ocl_clkeventi(target("spirv.DeviceEvent") %call, i32 noundef -42)
30   call spir_func void @_Z28capture_event_profiling_info12ocl_clkeventiPU3AS1v(target("spirv.DeviceEvent") %call, i32 noundef 1, i8 addrspace(1)* noundef %prof)
31   call spir_func void @_Z13release_event12ocl_clkevent(target("spirv.DeviceEvent") %call)
32   ret void
35 declare spir_func target("spirv.DeviceEvent") @_Z17create_user_eventv() local_unnamed_addr
37 declare spir_func zeroext i1 @_Z14is_valid_event12ocl_clkevent(target("spirv.DeviceEvent")) local_unnamed_addr
39 declare spir_func void @_Z12retain_event12ocl_clkevent(target("spirv.DeviceEvent")) local_unnamed_addr
41 declare spir_func void @_Z21set_user_event_status12ocl_clkeventi(target("spirv.DeviceEvent"), i32 noundef) local_unnamed_addr
43 declare spir_func void @_Z28capture_event_profiling_info12ocl_clkeventiPU3AS1v(target("spirv.DeviceEvent"), i32 noundef, i8 addrspace(1)* noundef) local_unnamed_addr
45 declare spir_func void @_Z13release_event12ocl_clkevent(target("spirv.DeviceEvent")) local_unnamed_addr