Skip to content

Commit 7085d99

Browse files
Guzewicz, Kacperigcbot
authored andcommitted
Conversion of IGC LITs for opaque pointer support, batch 1
This commit converts part of LITs so that igc_opt uses "--opaque-pointers" option that allows automatic conversion between typed and opaque pointers. Typed version of tests are still kept in separate files.
1 parent 9f18c6e commit 7085d99

File tree

144 files changed

+7067
-148
lines changed

Some content is hidden

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

144 files changed

+7067
-148
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
;=========================== begin_copyright_notice ============================
2+
;
3+
; Copyright (C) 2017-2021 Intel Corporation
4+
;
5+
; SPDX-License-Identifier: MIT
6+
;
7+
;============================ end_copyright_notice =============================
8+
9+
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
10+
; RUN: FileCheck %s --input-file=%t.ll
11+
12+
define i32 @foo(i32 %x) nounwind {
13+
ret i32 %x
14+
}
15+
16+
!igc.functions = !{!0}
17+
!0 = !{i32 (i32)* @foo, !1}
18+
!1 = !{ !2, !3, !4}
19+
!2 = !{ !"function_type", i32 0}
20+
!3 = !{ !"arg_desc"}
21+
!4 = !{ !"implicit_arg_desc", !6}
22+
!6 = !{i32 4}
23+
24+
; CHECK: define i32 @foo(i32 %x, <3 x i32> %globalSize)
25+
; CHECK-NOT: define i32 @foo(i32 %x)

IGC/Compiler/tests/AddImplicitArgs/signatiure_changed_GlobalSize.ll

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

9-
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
9+
; REQUIRES: llvm-14-plus
10+
; RUN: igc_opt --opaque-pointers -igc-add-implicit-args -S %s -o %t.ll
1011
; RUN: FileCheck %s --input-file=%t.ll
1112

1213
define i32 @foo(i32 %x) nounwind {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
;=========================== begin_copyright_notice ============================
2+
;
3+
; Copyright (C) 2017-2021 Intel Corporation
4+
;
5+
; SPDX-License-Identifier: MIT
6+
;
7+
;============================ end_copyright_notice =============================
8+
9+
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
10+
; RUN: FileCheck %s --input-file=%t.ll
11+
12+
define i32 @foo(i32 %x) nounwind {
13+
ret i32 %x
14+
}
15+
16+
!igc.functions = !{!0}
17+
!0 = !{i32 (i32)* @foo, !1}
18+
!1 = !{ !2, !3, !4}
19+
!2 = !{ !"function_type", i32 0}
20+
!3 = !{ !"arg_desc"}
21+
!4 = !{ !"implicit_arg_desc", !6, !7, !8}
22+
!6 = !{i32 7}
23+
!7 = !{i32 8}
24+
!8 = !{i32 9}
25+
26+
; CHECK: define i32 @foo(i32 %x, i16 %localIdX, i16 %localIdY, i16 %localIdZ)
27+
; CHECK-NOT: define i32 @foo(i32 %x)

IGC/Compiler/tests/AddImplicitArgs/signatiure_changed_LocaIdsl.ll

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

9-
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
9+
; REQUIRES: llvm-14-plus
10+
; RUN: igc_opt --opaque-pointers -igc-add-implicit-args -S %s -o %t.ll
1011
; RUN: FileCheck %s --input-file=%t.ll
1112

1213
define i32 @foo(i32 %x) nounwind {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
;=========================== begin_copyright_notice ============================
2+
;
3+
; Copyright (C) 2017-2021 Intel Corporation
4+
;
5+
; SPDX-License-Identifier: MIT
6+
;
7+
;============================ end_copyright_notice =============================
8+
9+
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
10+
; RUN: FileCheck %s --input-file=%t.ll
11+
12+
define i32 @foo(i32 %x) nounwind {
13+
ret i32 %x
14+
}
15+
16+
!igc.functions = !{!0}
17+
!0 = !{i32 (i32)* @foo, !1}
18+
!1 = !{ !2, !3, !4}
19+
!2 = !{ !"function_type", i32 0}
20+
!3 = !{ !"arg_desc"}
21+
!4 = !{ !"implicit_arg_desc", !6}
22+
!6 = !{i32 3}
23+
24+
; CHECK: define i32 @foo(i32 %x, <3 x i32> %numWorkGroups)
25+
; CHECK-NOT: define i32 @foo(i32 %x)

IGC/Compiler/tests/AddImplicitArgs/signatiure_changed_NumWorkGroups.ll

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

9-
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
9+
; REQUIRES: llvm-14-plus
10+
; RUN: igc_opt --opaque-pointers -igc-add-implicit-args -S %s -o %t.ll
1011
; RUN: FileCheck %s --input-file=%t.ll
1112

1213
define i32 @foo(i32 %x) nounwind {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
;=========================== begin_copyright_notice ============================
2+
;
3+
; Copyright (C) 2017-2021 Intel Corporation
4+
;
5+
; SPDX-License-Identifier: MIT
6+
;
7+
;============================ end_copyright_notice =============================
8+
9+
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
10+
; RUN: FileCheck %s --input-file=%t.ll
11+
12+
define i32 @foo(i32 %x) nounwind {
13+
ret i32 %x
14+
}
15+
16+
!igc.functions = !{!0}
17+
!0 = !{i32 (i32)* @foo, !1}
18+
!1 = !{ !2, !3, !4}
19+
!2 = !{ !"function_type", i32 0}
20+
!3 = !{ !"arg_desc"}
21+
!4 = !{ !"implicit_arg_desc", !6}
22+
!6 = !{i32 1}
23+
24+
; CHECK: define i32 @foo(i32 %x, <8 x i32> %payloadHeader)
25+
; CHECK-NOT: define i32 @foo(i32 %x)

IGC/Compiler/tests/AddImplicitArgs/signatiure_changed_PayloadHeader.ll

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

9-
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
9+
; REQUIRES: llvm-14-plus
10+
; RUN: igc_opt --opaque-pointers -igc-add-implicit-args -S %s -o %t.ll
1011
; RUN: FileCheck %s --input-file=%t.ll
1112

1213
define i32 @foo(i32 %x) nounwind {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
;=========================== begin_copyright_notice ============================
2+
;
3+
; Copyright (C) 2017-2021 Intel Corporation
4+
;
5+
; SPDX-License-Identifier: MIT
6+
;
7+
;============================ end_copyright_notice =============================
8+
9+
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
10+
; RUN: FileCheck %s --input-file=%t.ll
11+
12+
define i32 @foo(i32 %x) nounwind {
13+
ret i32 %x
14+
}
15+
16+
!igc.functions = !{!0}
17+
!0 = !{i32 (i32)* @foo, !1}
18+
!1 = !{ !2, !3, !4}
19+
!2 = !{ !"function_type", i32 0}
20+
!3 = !{ !"arg_desc"}
21+
!4 = !{ !"implicit_arg_desc", !6}
22+
!6 = !{i32 0}
23+
24+
; CHECK: define i32 @foo(i32 %x, <8 x i32> %r0)
25+
; CHECK-NOT: define i32 @foo(i32 %x)

IGC/Compiler/tests/AddImplicitArgs/signatiure_changed_R0.ll

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

9-
; RUN: igc_opt -igc-add-implicit-args -S %s -o %t.ll
9+
; REQUIRES: llvm-14-plus
10+
; RUN: igc_opt --opaque-pointers -igc-add-implicit-args -S %s -o %t.ll
1011
; RUN: FileCheck %s --input-file=%t.ll
1112

1213
define i32 @foo(i32 %x) nounwind {

0 commit comments

Comments
 (0)