|
| 1 | +;=========================== begin_copyright_notice ============================ |
| 2 | +; |
| 3 | +; Copyright (C) 2023 Intel Corporation |
| 4 | +; |
| 5 | +; SPDX-License-Identifier: MIT |
| 6 | +; |
| 7 | +;============================ end_copyright_notice ============================= |
| 8 | +; |
| 9 | +; RUN: igc_opt --serialize-igc-metadata -igc-spir-metadata-translation -S < %s | FileCheck %s |
| 10 | +; ------------------------------------------------ |
| 11 | +; SPIRMetaDataTranslation |
| 12 | +; ------------------------------------------------ |
| 13 | + |
| 14 | +; Check that during SPIRMetaData's propagation into IGCMetaData, 'null' |
| 15 | +; kernels are ignored by the translation/serialization routines. |
| 16 | + |
| 17 | +; TODO: Such null entries are typically encountered in partial recompilation |
| 18 | +; scenarios as leftovers from the initial compilation. Were the metadata |
| 19 | +; cleanup handled by retry manager routines, this test would no longer be |
| 20 | +; needed. |
| 21 | + |
| 22 | +declare spir_kernel void @test_spir(i64 addrspace(1)*) |
| 23 | + |
| 24 | +; CHECK: {!"FuncMDMap[0]", void (i64 addrspace(1)*)* @test_spir} |
| 25 | +; CHECK-NOT: {!"FuncMDMap[{{0-9}}]", |
| 26 | + |
| 27 | +!opencl.kernels = !{!0, !1, !12} |
| 28 | +!opencl.compiler.options = !{!19} |
| 29 | + |
| 30 | +; COM: The following kernel metadata sequence should be omitted by the pass |
| 31 | +!0 = distinct !{null, !13, !14, !15, !16, !17, !18} |
| 32 | +; COM: End null kernel sequence |
| 33 | +!1 = !{void (i64 addrspace(1)*)* @test_spir, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11} |
| 34 | +!2 = !{!"kernel_arg_addr_space", i32 1} |
| 35 | +!3 = !{!"kernel_arg_access_qual", !"none"} |
| 36 | +!4 = !{!"kernel_arg_type", !"long*"} |
| 37 | +!5 = !{!"kernel_arg_type_qual", !"volatile"} |
| 38 | +!6 = !{!"kernel_arg_base_type", !"long*"} |
| 39 | +!7 = !{!"kernel_arg_name", !"dst"} |
| 40 | +!8 = !{!"reqd_work_group_size", i32 1, i32 1, i32 16} |
| 41 | +!9 = !{!"work_group_size_hint", i32 1, i32 1, i32 4} |
| 42 | +!10 = !{!"vec_type_hint", <4 x float> undef, i32 0} |
| 43 | +!11 = !{!"intel_reqd_sub_group_size", i32 16} |
| 44 | +; COM: The following kernel metadata sequence should be omitted by the pass |
| 45 | +!12 = distinct !{null, !13, !14, !15, !16, !17, !18} |
| 46 | +!13 = !{!"kernel_arg_addr_space", i32 0} |
| 47 | +!14 = !{!"kernel_arg_access_qual", !"none"} |
| 48 | +!15 = !{!"kernel_arg_type", !"void*"} |
| 49 | +!16 = !{!"kernel_arg_type_qual", !""} |
| 50 | +!17 = !{!"kernel_arg_base_type", !"void*"} |
| 51 | +!18 = !{!"kernel_arg_name", !"null_arg"} |
| 52 | +; COM: End null kernel sequence |
| 53 | +!19 = !{!"-cl-std=CL2.0", !"-cl-opt-disable", !"-g", !"-denorms-are-zero", !"-fp32-correctly-rounded-divide-sqrt", !"-mad-enable", !"-no-signed-zeros", !"-unsafe-math-optimizations", !"-finite-math-only", !"-fast-relaxed-math", !"-relaxed-builtins", !"-match-sincospi"} |
0 commit comments