[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / CodeGenOpenCL / intel-subgroups-avc-ext-types.cl
blob3c55276213e6266766b16574f8cbdf3e1666cdb8
1 // RUN: %clang_cc1 -no-opaque-pointers %s -triple spir-unknown-unknown -cl-std=CL1.2 -cl-ext=+cl_intel_device_side_avc_motion_estimation -emit-llvm -o - -O0 | FileCheck %s
3 // CHECK: %opencl.intel_sub_group_avc_mce_payload_t = type opaque
4 // CHECK: %opencl.intel_sub_group_avc_ime_payload_t = type opaque
5 // CHECK: %opencl.intel_sub_group_avc_ref_payload_t = type opaque
6 // CHECK: %opencl.intel_sub_group_avc_sic_payload_t = type opaque
8 // CHECK: %opencl.intel_sub_group_avc_mce_result_t = type opaque
9 // CHECK: %opencl.intel_sub_group_avc_ime_result_t = type opaque
10 // CHECK: %opencl.intel_sub_group_avc_ref_result_t = type opaque
11 // CHECK: %opencl.intel_sub_group_avc_sic_result_t = type opaque
13 // CHECK: %opencl.intel_sub_group_avc_ime_result_single_reference_streamout_t = type opaque
14 // CHECK: %opencl.intel_sub_group_avc_ime_result_dual_reference_streamout_t = type opaque
15 // CHECK: %opencl.intel_sub_group_avc_ime_single_reference_streamin_t = type opaque
16 // CHECK: %opencl.intel_sub_group_avc_ime_dual_reference_streamin_t = type opaque
18 // CHECK: store %opencl.intel_sub_group_avc_ime_payload_t* null,
19 // CHECK: store %opencl.intel_sub_group_avc_ref_payload_t* null,
20 // CHECK: store %opencl.intel_sub_group_avc_sic_payload_t* null,
22 // CHECK: store %opencl.intel_sub_group_avc_ime_result_t* null,
23 // CHECK: store %opencl.intel_sub_group_avc_ref_result_t* null,
24 // CHECK: store %opencl.intel_sub_group_avc_sic_result_t* null,
26 // CHECK: store %opencl.intel_sub_group_avc_ime_result_single_reference_streamout_t* null,
27 // CHECK: store %opencl.intel_sub_group_avc_ime_result_dual_reference_streamout_t* null,
28 // CHECK: store %opencl.intel_sub_group_avc_ime_single_reference_streamin_t* null,
29 // CHECK: store %opencl.intel_sub_group_avc_ime_dual_reference_streamin_t* null,
31 // CHECK: store %opencl.intel_sub_group_avc_ime_payload_t* null,
32 // CHECK: store %opencl.intel_sub_group_avc_ref_payload_t* null,
33 // CHECK: store %opencl.intel_sub_group_avc_sic_payload_t* null,
35 // CHECK: store %opencl.intel_sub_group_avc_ime_result_t* null,
36 // CHECK: store %opencl.intel_sub_group_avc_ref_result_t* null,
37 // CHECK: store %opencl.intel_sub_group_avc_sic_result_t* null,
39 // CHECK: store %opencl.intel_sub_group_avc_ime_result_single_reference_streamout_t* null,
40 // CHECK: store %opencl.intel_sub_group_avc_ime_result_dual_reference_streamout_t* null,
41 // CHECK: store %opencl.intel_sub_group_avc_ime_single_reference_streamin_t* null,
42 // CHECK: store %opencl.intel_sub_group_avc_ime_dual_reference_streamin_t* null,
44 #pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : enable
46 // Using 0x0 directly allows us not to include opencl-c.h header and not to
47 // redefine all of these CLK_AVC_*_INTITIALIZE_INTEL macro. '0x0' value must
48 // be in sync with ones defined in opencl-c.h
50 void foo() {
51 intel_sub_group_avc_mce_payload_t payload_mce; // No literal initializer for mce types
52 intel_sub_group_avc_ime_payload_t payload_ime = 0x0;
53 intel_sub_group_avc_ref_payload_t payload_ref = 0x0;
54 intel_sub_group_avc_sic_payload_t payload_sic = 0x0;
56 intel_sub_group_avc_mce_result_t result_mce; // No literal initializer for mce types
57 intel_sub_group_avc_ime_result_t result_ime = 0x0;
58 intel_sub_group_avc_ref_result_t result_ref = 0x0;
59 intel_sub_group_avc_sic_result_t result_sic = 0x0;
61 intel_sub_group_avc_ime_result_single_reference_streamout_t sstreamout = 0x0;
62 intel_sub_group_avc_ime_result_dual_reference_streamout_t dstreamout = 0x0;
63 intel_sub_group_avc_ime_single_reference_streamin_t sstreamin = 0x0;
64 intel_sub_group_avc_ime_dual_reference_streamin_t dstreamin = 0x0;
66 // Initialization with initializer list was supported in the first version
67 // of the extension. So we check for backward compatibility here.
68 intel_sub_group_avc_ime_payload_t payload_ime_list = {0};
69 intel_sub_group_avc_ref_payload_t payload_ref_list = {0};
70 intel_sub_group_avc_sic_payload_t payload_sic_list = {0};
72 intel_sub_group_avc_ime_result_t result_ime_list = {0};
73 intel_sub_group_avc_ref_result_t result_ref_list = {0};
74 intel_sub_group_avc_sic_result_t result_sic_list = {0};
76 intel_sub_group_avc_ime_result_single_reference_streamout_t sstreamout_list = {0};
77 intel_sub_group_avc_ime_result_dual_reference_streamout_t dstreamout_list = {0};
78 intel_sub_group_avc_ime_single_reference_streamin_t sstreamin_list = {0};
79 intel_sub_group_avc_ime_dual_reference_streamin_t dstreamin_list = {0};