Skip to content

Commit b6c58e9

Browse files
mshelegoigcbot
authored andcommitted
LIT opaque pointers support (part 2)
This change is a part of the effort to support opaque pointers in newer LLVM versions
1 parent 40bfde2 commit b6c58e9

File tree

75 files changed

+1163
-631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1163
-631
lines changed

IGC/VectorCompiler/test/CMABI/debug-bool.ll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2022 Intel Corporation
3+
; Copyright (C) 2022-2024 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
88
;
9-
; RUN: %opt %use_old_pass_manager% -cmabi -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=Gen9 -S < %s | FileCheck %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-TYPED-PTRS
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-OPAQUE-PTRS
1011
; ------------------------------------------------
1112
; CMABI
1213
; ------------------------------------------------
@@ -20,7 +21,8 @@
2021
; CHECK: void @llvm.dbg.value(metadata <2 x i1> [[VAL1_V:%[A-z0-9]*]], metadata [[VAL1_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL1_LOC:![0-9]*]]
2122
; CHECK: void @llvm.dbg.value(metadata i1 [[VAL2_V:%[A-z0-9]*]], metadata [[VAL2_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL2_LOC:![0-9]*]]
2223
; CHECK: [[VAL3_V:%[A-z0-9]*]] = {{.*}}, !dbg [[VAL3_LOC:![0-9]*]]
23-
; CHECK: void @llvm.dbg.value(metadata <2 x i1>* [[VAL3_V]], metadata [[VAL3_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL3_LOC]]
24+
; CHECK-TYPED-PTRS: void @llvm.dbg.value(metadata <2 x i1>* [[VAL3_V]], metadata [[VAL3_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL3_LOC]]
25+
; CHECK-OPAQUE-PTRS: void @llvm.dbg.value(metadata ptr [[VAL3_V]], metadata [[VAL3_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL3_LOC]]
2426
; CHECK: [[VAL4_V:%[A-z0-9]*]] = {{.*}}, !dbg [[VAL4_LOC:![0-9]*]]
2527
; CHECK: void @llvm.dbg.value(metadata <2 x i1> [[VAL4_V]], metadata [[VAL4_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL4_LOC]]
2628

IGC/VectorCompiler/test/CMABI/debuginfo_kernel_implicit.ll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2021 Intel Corporation
3+
; Copyright (C) 2021-2024 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
88

9-
; RUN: %opt %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-TYPED-PTRS
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-OPAQUE-PTRS
1011

1112
target datalayout = "e-p:64:64-i64:64-n8:16:32:64"
1213
target triple = "spir64-unknown-unknown"
@@ -16,7 +17,8 @@ target triple = "spir64-unknown-unknown"
1617
; CHECK-LABEL: @K1
1718
; CHECK-SAME: (i32 %0, <3 x i16> %__arg_llvm.genx.local.id16, i64 %privBase)
1819
; CHECK: [[K1_ALLOCA:%[^ ]+]] = alloca <3 x i16>
19-
; CHECK: call void @llvm.dbg.declare(metadata <3 x i16>* [[K1_ALLOCA]], metadata ![[#K1VAR:]], metadata !DIExpression()), !dbg ![[#K1LOC:]]
20+
; CHECK-TYPED-PTRS: call void @llvm.dbg.declare(metadata <3 x i16>* [[K1_ALLOCA]], metadata ![[#K1VAR:]], metadata !DIExpression()), !dbg ![[#K1LOC:]]
21+
; CHECK-OPAQUE-PTRS: call void @llvm.dbg.declare(metadata ptr [[K1_ALLOCA]], metadata ![[#K1VAR:]], metadata !DIExpression()), !dbg ![[#K1LOC:]]
2022
; CHECK-DAG: ![[#K1_SP:]] = distinct !DISubprogram(name: "K1",
2123
; CHECK-DAG: ![[#K1VAR]] = !DILocalVariable(name: "__llvm_genx_local_id16", scope: ![[#K1_SP]], file: ![[#]], type: ![[#K1VAR_TYPE:]], flags: DIFlagArtificial)
2224
; CHECK-DAG: ![[#K1VAR_TYPE]] = !DICompositeType(tag: DW_TAG_array_type, baseType: ![[#K1VAR_BASE_TYPE:]], size: 48, flags: DIFlagVector, elements: ![[#K1VAR_ELEMENTS:]])

IGC/VectorCompiler/test/CMABI/debuginfo_kernel_localized.ll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2021 Intel Corporation
3+
; Copyright (C) 2021-2024 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
88

9-
; RUN: %opt %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-TYPED-PTRS
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-OPAQUE-PTRS
1011

1112
target datalayout = "e-p:64:64-i64:64-n8:16:32:64"
1213
target triple = "spir64-unknown-unknown"
@@ -16,7 +17,8 @@ target triple = "spir64-unknown-unknown"
1617
; CHECK-LABEL: @K1
1718
; CHECK-SAME: (i32 %0, i64 %privBase)
1819
; CHECK: [[K1_ALLOCA:%[^ ]+]] = alloca i32
19-
; CHECK: call void @llvm.dbg.declare(metadata i32* [[K1_ALLOCA]], metadata ![[#K1VAR:]], metadata !DIExpression()), !dbg ![[#K1LOC:]]
20+
; CHECK-TYPED-PTRS: call void @llvm.dbg.declare(metadata i32* [[K1_ALLOCA]], metadata ![[#K1VAR:]], metadata !DIExpression()), !dbg ![[#K1LOC:]]
21+
; CHECK-OPAQUE-PTRS: call void @llvm.dbg.declare(metadata ptr [[K1_ALLOCA]], metadata ![[#K1VAR:]], metadata !DIExpression()), !dbg ![[#K1LOC:]]
2022
; CHECK-DAG: ![[#K1_SP:]] = distinct !DISubprogram(name: "K1",
2123
; CHECK-DAG: ![[#K1VAR]] = !DILocalVariable(name: "x", scope: ![[#K1_SP]], file: ![[#]], type: ![[#TYPE:]], flags: DIFlagArtificial)
2224
; CHECK-DAG: ![[#TYPE]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)

IGC/VectorCompiler/test/CMABI/debuginfo_stackcall_global.ll

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2021 Intel Corporation
3+
; Copyright (C) 2021-2024 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
88

9-
; RUN: %opt %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck --check-prefix=CHECK_S1 %s
10-
; RUN: %opt %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck --check-prefix=CHECK_K1 %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK_S1,CHECK_S1-TYPED-PTRS
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK_S1,CHECK_S1-OPAQUE-PTRS
11+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK_K1,CHECK_K1-TYPED-PTRS
12+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK_K1,CHECK_K1-OPAQUE-PTRS
1113

1214
target datalayout = "e-p:64:64-i64:64-n8:16:32:64"
1315
target triple = "spir64-unknown-unknown"
@@ -17,7 +19,8 @@ target triple = "spir64-unknown-unknown"
1719
; CHECK_S1-LABEL: @S1
1820
; CHECK_S1-SAME: (i32 %0, i32 %x.in)
1921
; CHECK_S1: [[S1_ALLOCA:%[^ ]+]] = alloca i32
20-
; CHECK_S1: call void @llvm.dbg.declare(metadata i32* [[S1_ALLOCA]], metadata ![[#S1VAR:]], metadata !DIExpression()), !dbg ![[#S1LOC:]]
22+
; CHECK_S1-TYPED-PTRS: call void @llvm.dbg.declare(metadata i32* [[S1_ALLOCA]], metadata ![[#S1VAR:]], metadata !DIExpression()), !dbg ![[#S1LOC:]]
23+
; CHECK_S1-OPAQUE-PTRS: call void @llvm.dbg.declare(metadata ptr [[S1_ALLOCA]], metadata ![[#S1VAR:]], metadata !DIExpression()), !dbg ![[#S1LOC:]]
2124
; CHECK_S1-DAG: ![[#S1_SP:]] = distinct !DISubprogram(name: "S1",
2225
; CHECK_S1-DAG: ![[#S1VAR]] = !DILocalVariable(name: "x", scope: ![[#S1_SP]], file: ![[#]], type: ![[#S1TYPE:]], flags: DIFlagArtificial)
2326
; CHECK_S1-DAG: ![[#S1TYPE]] = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
@@ -31,7 +34,8 @@ define internal spir_func <8 x i32> @S1(i32 %0) #1 !dbg !17 {
3134
; CHECK_K1-LABEL: @K1
3235
; CHECK_K1-SAME: (i32 %0, i64 %privBase)
3336
; CHECK_K1: [[K1_ALLOCA:%[^ ]+]] = alloca i32
34-
; CHECK_K1: call void @llvm.dbg.declare(metadata i32* [[K1_ALLOCA]], metadata ![[#K1VAR:]], metadata !DIExpression()), !dbg ![[#K1LOC:]]
37+
; CHECK_K1-TYPED-PTRS: call void @llvm.dbg.declare(metadata i32* [[K1_ALLOCA]], metadata ![[#K1VAR:]], metadata !DIExpression()), !dbg ![[#K1LOC:]]
38+
; CHECK_K1-OPAQUE-PTRS: call void @llvm.dbg.declare(metadata ptr [[K1_ALLOCA]], metadata ![[#K1VAR:]], metadata !DIExpression()), !dbg ![[#K1LOC:]]
3539
; CHECK_K1-DAG: ![[#K1_SP:]] = distinct !DISubprogram(name: "K1",
3640
; CHECK_K1-DAG: ![[#K1VAR]] = !DILocalVariable(name: "x", scope: ![[#K1_SP]], file: ![[#]], type: ![[#K1TYPE:]], flags: DIFlagArtificial)
3741
; CHECK_K1-DAG: ![[#K1TYPE]] = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)

IGC/VectorCompiler/test/CMABI/func_with_taken_addr.ll

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2021 Intel Corporation
3+
; Copyright (C) 2021-2024 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
88

9-
; RUN: %opt %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-TYPED-PTRS
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-OPAQUE-PTRS
1011

1112
target datalayout = "e-p:64:64-i64:64-n8:16:32"
1213

@@ -15,8 +16,10 @@ define internal spir_func void @foo(<8 x i32>* %vector.ref) {
1516
ret void
1617
}
1718
; COM: should stay the same
18-
; CHECK: define internal spir_func void @foo(<8 x i32>* %vector.ref) {
19-
; CHECK-NEXT: %vector.ld = load <8 x i32>, <8 x i32>* %vector.ref
19+
; CHECK-TYPED-PTRS: define internal spir_func void @foo(<8 x i32>* %vector.ref) {
20+
; CHECK-TYPED-PTRS-NEXT: %vector.ld = load <8 x i32>, <8 x i32>* %vector.ref
21+
; CHECK-OPAQUE-PTRS: define internal spir_func void @foo(ptr %vector.ref) {
22+
; CHECK-OPAQUE-PTRS-NEXT: %vector.ld = load <8 x i32>, ptr %vector.ref
2023
; CHECK-NEXT: ret void
2124
; CHECK-NEXT: }
2225

@@ -29,8 +32,10 @@ define dllexport void @kernel(i32 %val) {
2932
; COM: should stay the same
3033
; CHECK: define dllexport void @kernel(i32 %val) {
3134
; CHECK-NEXT: %vec.alloca = alloca <8 x i32>, align 32
32-
; CHECK-NEXT: call spir_func void @foo(<8 x i32>* nonnull %vec.alloca)
33-
; CHECK-NEXT: %indirect.user = ptrtoint void (<8 x i32>*)* @foo to i32
35+
; CHECK-TYPED-PTRS-NEXT: call spir_func void @foo(<8 x i32>* nonnull %vec.alloca)
36+
; CHECK-TYPED-PTRS-NEXT: %indirect.user = ptrtoint void (<8 x i32>*)* @foo to i32
37+
; CHECK-OPAQUE-PTRS-NEXT: call spir_func void @foo(ptr nonnull %vec.alloca)
38+
; CHECK-OPAQUE-PTRS-NEXT: %indirect.user = ptrtoint ptr @foo to i32
3439
; CHECK-NEXT: ret void
3540
; CHECK-NEXT: }
3641

IGC/VectorCompiler/test/CMABI/global_without_align.ll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2021 Intel Corporation
3+
; Copyright (C) 2021-2024 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
88

9-
; RUN: %opt %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-TYPED-PTRS
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-OPAQUE-PTRS
1011

1112
target datalayout = "e-p:64:64-i64:64-n8:16:32"
1213

@@ -18,7 +19,8 @@ target datalayout = "e-p:64:64-i64:64-n8:16:32"
1819
; FIXME: Make 'align 1' an unconditional part of the check after LLVM 9-10
1920
; gets abolished.
2021
; CHECK: %global.int.local = alloca i32{{(, align 1)?}}
21-
; CHECK: store i32 0, i32* %global.int.local{{(, align 1)?}}
22+
; CHECK-TYPED-PTRS: store i32 0, i32* %global.int.local{{(, align 1)?}}
23+
; CHECK-OPAQUE-PTRS: store i32 0, ptr %global.int.local{{(, align 1)?}}
2224
define dllexport void @kernel(float %kernel.value) {
2325
%1 = load i32, i32* @global.int, align 4
2426
ret void

IGC/VectorCompiler/test/CMABI/linearization.ll

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2021 Intel Corporation
3+
; Copyright (C) 2021-2024 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
88

9-
; RUN: %opt %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -cmabi -march=genx64 -mcpu=Gen9 -S < %s | FileCheck %s
1011

1112
target datalayout = "e-p:64:64-i64:64-n8:16:32:64"
1213
target triple = "spir64-unknown-unknown"
1314

15+
; CHECK: define dllexport void @cmk_kmeans(i8
1416
define dllexport void @cmk_kmeans(i1 zeroext %0, i64 %privBase) #0 {
1517
ret void
1618
}
@@ -30,14 +32,8 @@ attributes #0 = { noinline nounwind "CMGenxMain" "oclrt"="1" }
3032
!1 = !{i32 1, i32 2}
3133
!2 = !{}
3234
!3 = !{i16 6, i16 14}
33-
; CHECK: !4 = !{void
34-
; CHECK-NOT: i1
35-
; CHECK-SAME: i8
3635
!4 = !{void (i1, i64)* @cmk_kmeans, !"cmk_kmeans", !5, i32 0, i32 0, !6, !7, i32 0}
3736
!5 = !{i32 0, i32 96}
3837
!6 = !{i32 0}
3938
!7 = !{!"buffer_t read_write", !"buffer_t read_write", !"buffer_t read_write", !"", !""}
40-
; CHECK: !8 = !{void
41-
; CHECK-NOT: i1
42-
; CHECK-SAME: i8
4339
!8 = !{void (i1, i64)* @cmk_kmeans, null, null, !2, null}

IGC/VectorCompiler/test/GenXCFSimplification/debug.ll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
;=========================== begin_copyright_notice ============================
22
;
3-
; Copyright (C) 2022 Intel Corporation
3+
; Copyright (C) 2022-2024 Intel Corporation
44
;
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
88
;
9-
; RUN: %opt %use_old_pass_manager% -GenXCFSimplification -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=Gen9 -S < %s | FileCheck %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -GenXCFSimplification -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-TYPED-PTRS
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -GenXCFSimplification -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=Gen9 -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-OPAQUE-PTRS
1011
; ------------------------------------------------
1112
; GenXCFSimplification
1213
; ------------------------------------------------
@@ -23,7 +24,8 @@
2324
; CHECK: [[VAL3_V:%[A-z0-9.]*]] = {{.*}}, !dbg [[VAL3_LOC:![0-9]*]]
2425
; CHECK: void @llvm.dbg.value(metadata i32 [[VAL3_V]], metadata [[VAL3_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL3_LOC]]
2526
; CHECK: [[VAL4_V:%[A-z0-9.]*]] = {{.*}}, !dbg [[VAL4_LOC:![0-9]*]]
26-
; CHECK: void @llvm.dbg.value(metadata i32* [[VAL4_V]], metadata [[VAL4_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL4_LOC]]
27+
; CHECK-TYPED-PTRS: void @llvm.dbg.value(metadata i32* [[VAL4_V]], metadata [[VAL4_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL4_LOC]]
28+
; CHECK-OPAQUE-PTRS: void @llvm.dbg.value(metadata ptr [[VAL4_V]], metadata [[VAL4_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL4_LOC]]
2729
; CHECK: [[VAL5_V:%[A-z0-9.]*]] = {{.*}}, !dbg [[VAL5_LOC:![0-9]*]]
2830
; CHECK: void @llvm.dbg.value(metadata i32 [[VAL5_V]], metadata [[VAL5_MD:![0-9]*]], metadata !DIExpression()), !dbg [[VAL5_LOC]]
2931
; CHECK: [[VAL6_V:%[A-z0-9.]*]] = {{.*}}, !dbg [[VAL6_LOC:![0-9]*]]

IGC/VectorCompiler/test/GenXDetectPointerArg/integer.ll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
;
77
;============================ end_copyright_notice =============================
88
;
9-
; RUN: %opt %use_old_pass_manager% -GenXDetectPointerArg -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=XeHPC -S < %s | FileCheck %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -GenXDetectPointerArg -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=XeHPC -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-TYPED-PTRS
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -GenXDetectPointerArg -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=XeHPC -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-OPAQUE-PTRS
1011

1112
@data = internal global <8 x i64> undef, align 64, !spirv.Decorations !0 #0
1213

@@ -39,7 +40,8 @@ attributes #3 = { nofree nounwind readonly "target-cpu"="XeHPC" }
3940
!llvm.module.flags = !{!20}
4041

4142
; CHECK: !genx.kernels = !{![[KERNEL:[0-9]+]]}
42-
; CHECK: ![[KERNEL]] = !{void (i64, i64)* @kernel, !"kernel", !{{[0-9]+}}, i32 0, !{{[0-9]+}}, !{{[0-9]+}}, ![[NODE:[0-9]+]], i32 0}
43+
; CHECK-TYPED-PTRS: ![[KERNEL]] = !{void (i64, i64)* @kernel, !"kernel", !{{[0-9]+}}, i32 0, !{{[0-9]+}}, !{{[0-9]+}}, ![[NODE:[0-9]+]], i32 0}
44+
; CHECK-OPAQUE-PTRS: ![[KERNEL]] = !{ptr @kernel, !"kernel", !{{[0-9]+}}, i32 0, !{{[0-9]+}}, !{{[0-9]+}}, ![[NODE:[0-9]+]], i32 0}
4345
; CHECK: ![[NODE]] = !{!"svmptr_t", !""}
4446

4547
!0 = !{!1, !2, !3, !4}

IGC/VectorCompiler/test/GenXDetectPointerArg/struct-alloca.ll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
;
77
;============================ end_copyright_notice =============================
88

9-
; RUN: %opt %use_old_pass_manager% -GenXDetectPointerArg -march=genx64 -mcpu=XeHPC -S < %s | FileCheck %s
9+
; RUN: %opt_typed_ptrs %use_old_pass_manager% -GenXDetectPointerArg -march=genx64 -mcpu=XeHPC -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-TYPED-PTRS
10+
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -GenXDetectPointerArg -march=genx64 -mcpu=XeHPC -S < %s | FileCheck %s --check-prefixes=CHECK,CHECK-OPAQUE-PTRS
1011

1112
target datalayout = "e-p:64:64-i64:64-n8:16:32:64"
1213

@@ -54,7 +55,8 @@ attributes #3 = { "target-cpu"="XeHPC" }
5455
!genx.kernel.internal = !{!10}
5556

5657
; CHECK: !genx.kernels = !{![[KERNEL:[0-9]+]]}
57-
; CHECK: ![[KERNEL]] = !{void (%struct.state*, i32 addrspace(1)*, i64, i8, i64, float)* @foo, !"foo", !{{[0-9]+}}, i32 0, !{{[0-9]+}}, !{{[0-9]+}}, ![[NODE:[0-9]+]], i32 0}
58+
; CHECK-TYPED-PTRS: ![[KERNEL]] = !{void (%struct.state*, i32 addrspace(1)*, i64, i8, i64, float)* @foo, !"foo", !{{[0-9]+}}, i32 0, !{{[0-9]+}}, !{{[0-9]+}}, ![[NODE:[0-9]+]], i32 0}
59+
; CHECK-OPAQUE-PTRS: ![[KERNEL]] = !{ptr @foo, !"foo", !{{[0-9]+}}, i32 0, !{{[0-9]+}}, !{{[0-9]+}}, ![[NODE:[0-9]+]], i32 0}
5860
; CHECK: ![[NODE]] = !{!"svmptr_t", !"svmptr_t", !"", !"", !"svmptr_t", !""}
5961

6062
!0 = !{i32 0, i32 100000}

0 commit comments

Comments
 (0)