-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add example of issue 1243 to detect changes in clspv (#1244)
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; RUN: clspv-opt %s -o %t.ll --passes=simplify-pointer-bitcast | ||
; RUN: FileCheck %s < %t.ll | ||
|
||
; CHECK: [[gep:%[^ ]+]] = getelementptr <4 x i32>, ptr addrspace(1) %a, i32 %i | ||
|
||
; TODO (#1243): Wrong simplification! we should have something with the div and mod of %i in the gep indices | ||
; CHECK: getelementptr <4 x i32>, ptr addrspace(1) %a, i32 0, i32 %i | ||
|
||
define spir_kernel void @test(ptr addrspace(1) %a, i32 %i) { | ||
entry: | ||
%0 = getelementptr <4 x i32>, ptr addrspace(1) %a, i32 %i | ||
%1 = getelementptr i32, ptr addrspace(1) %a, i32 %i | ||
ret void | ||
} |