Skip to content

Commit

Permalink
add example of issue 1243 to detect changes in clspv (#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjodinchr authored Oct 4, 2023
1 parent 6f838ad commit cd48230
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/PointerCasts/issue-1243.ll
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
}

0 comments on commit cd48230

Please sign in to comment.