Debian Codegraph @

vc-intrinsics/GenXIntrinsics/test/Adaptors/opaque_ptrs/args_attributes_transform_writer.ll

raw
1 ;=========================== begin_copyright_notice ============================
2 ;
3 ; Copyright (C) 2024-2025 Intel Corporation
4 ;
5 ; SPDX-License-Identifier: MIT
6 ;
7 ;============================ end_copyright_notice =============================
8
9 ; Test that adaptor correctly handles parameter attributes with types.
10
11 ; REQUIRES: opaque-pointers
12 ; RUN: opt -passes=GenXSPIRVWriterAdaptor -S < %s | FileCheck %s
13
14 %foo = type { i32 }
15
16 ; CHECK: define spir_kernel void @test(
17 ; CHECK-SAME: ptr addrspace(1) byval(%foo)
18 ; CHECK-NOT: "VCArgumentDesc"
19 ; CHECK-NOT: "VCArgumentKind"
20 ; CHECK-SAME: [[ARG:%[^)]+]])
21 define spir_kernel void @test(ptr addrspace(1) byval(%foo) %arg) {
22 ; CHECK-NEXT: ret void
23 ret void
24 }
25
26 ; CHECK-NOT: !genx.kernels
27 !genx.kernels = !{!0}
28 !0 = !{ptr @test, !"test", !1, i32 0, i32 0, !2, !3, i32 0}
29 !1 = !{i32 0}
30 !2 = !{i32 0}
31 !3 = !{!"svmptr_t"}