Skip to content

Commit 4ccc798

Browse files
mateuszchudykigcbot
authored andcommitted
Add new LIT test for MinimumValidAddressChecking pass
Add new LIT test for MinimumValidAddressChecking pass
1 parent 4827fbb commit 4ccc798

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
;=========================== begin_copyright_notice ============================
2+
;
3+
; Copyright (C) 2024 Intel Corporation
4+
;
5+
; SPDX-License-Identifier: MIT
6+
;
7+
;============================ end_copyright_notice =============================
8+
9+
; RUN: igc_opt -igc-minimum-valid-address-checking -S %s -o %t.ll
10+
; RUN: FileCheck %s --input-file=%t.ll
11+
12+
define spir_kernel void @kernel(i32 addrspace(1)* %input) nounwind {
13+
%1 = getelementptr inbounds i32, i32 addrspace(1)* %input, i64 2
14+
%2 = load i32, i32 addrspace(1)* %1
15+
%3 = add i32 %2, 0
16+
ret void
17+
}
18+
19+
!igc.functions = !{!0}
20+
21+
!0 = !{void (i32 addrspace(1)*)* @kernel, !1}
22+
!1 = !{!2}
23+
!2 = !{!"function_type", i32 0}
24+
25+
; CHECK: define spir_kernel void @kernel(i32 addrspace(1)* %input)
26+
; CHECK-NEXT: %1 = getelementptr inbounds i32, i32 addrspace(1)* %input, i64 2
27+
; CHECK-NEXT: %2 = load i32, i32 addrspace(1)* %1
28+
; CHECK-NEXT: %3 = add i32 %2, 0
29+
; CHECK-NEXT: ret void
30+
; CHECK-NEXT: }
31+
32+
; CHECK-NOT: declare void @__minimumvalidaddresschecking

0 commit comments

Comments
 (0)