Skip to content

Commit

Permalink
Update LLVM (#1428)
Browse files Browse the repository at this point in the history
Add optional 'nuw' on getelementptr in tests
  • Loading branch information
dneto0 authored Dec 11, 2024
1 parent 4aacc18 commit 878c944
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"subrepo" : "llvm/llvm-project",
"branch" : "main",
"subdir" : "third_party/llvm",
"commit" : "5fa59edfa73a69ab146d7b9cc115de5770d11dca"
"commit" : "de56df9eb5248006ac64744e962ee053e72d028c"
},
{
"name" : "SPIRV-Headers",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
; CHECK: define spir_func i32 @_Z17get_global_offsetj(i32 [[p:%[0-9]+]])
; CHECK: [[cmp:%[0-9]+]] = icmp ult i32 [[p]], 3
; CHECK: [[sel:%[0-9]+]] = select i1 [[cmp]], i32 [[p]], i32 0
; CHECK: [[gep:%[0-9]+]] = getelementptr inbounds [[type]], ptr addrspace(9) @__push_constants, i32 0, i32 0, i32 [[sel]]
; CHECK: [[gep:%[0-9]+]] = getelementptr inbounds {{(nuw )?}}[[type]], ptr addrspace(9) @__push_constants, i32 0, i32 0, i32 [[sel]]
; CHECK: [[ld:%[0-9]+]] = load i32, ptr addrspace(9) [[gep]]
; CHECK: [[sel:%[0-9]+]] = select i1 [[cmp]], i32 [[ld]], i32 0
; CHECK: ret i32 [[sel]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; CHECK: define spir_func i32 @_Z17get_global_offsetj(i32 [[p:%[0-9]+]])
; CHECK: [[cmp:%[0-9]+]] = icmp ult i32 [[p]], 3
; CHECK: [[sel:%[0-9]+]] = select i1 [[cmp]], i32 [[p]], i32 0
; CHECK: [[gep:%[0-9]+]] = getelementptr inbounds <3 x i32>, ptr addrspace(8) @__spirv_GlobalOffset, i32 0, i32 [[sel]]
; CHECK: [[gep:%[0-9]+]] = getelementptr inbounds {{(nuw )?}}<3 x i32>, ptr addrspace(8) @__spirv_GlobalOffset, i32 0, i32 [[sel]]
; CHECK: [[ld:%[0-9]+]] = load i32, ptr addrspace(8) [[gep]]
; CHECK: [[sel:%[0-9]+]] = select i1 [[cmp]], i32 [[ld]], i32 0
; CHECK: ret i32 [[sel]]
Expand Down
2 changes: 1 addition & 1 deletion test/WorkItemBuiltins/get_group_id.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
; CHECK: define spir_func i32 @_Z12get_group_idj(i32 [[p:%[0-9]+]])
; CHECK: [[cmp:%[0-9]+]] = icmp ult i32 [[p]], 3
; CHECK: [[sel:%[0-9]+]] = select i1 [[cmp]], i32 [[p]], i32 0
; CHECK: [[gep:%[0-9]+]] = getelementptr inbounds <3 x i32>, ptr addrspace(5) @__spirv_WorkgroupId, i32 0, i32 [[sel]]
; CHECK: [[gep:%[0-9]+]] = getelementptr inbounds {{(nuw )?}}<3 x i32>, ptr addrspace(5) @__spirv_WorkgroupId, i32 0, i32 [[sel]]
; CHECK: [[ld:%[0-9]+]] = load i32, ptr addrspace(5) [[gep]]
; CHECK: [[sel:%[0-9]+]] = select i1 [[cmp]], i32 [[ld]], i32 0
; CHECK: ret i32 [[sel]]
Expand Down
2 changes: 1 addition & 1 deletion test/WorkItemBuiltins/get_num_groups.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
; CHECK: define spir_func i32 @_Z14get_num_groupsj(i32 [[p:%[0-9]+]])
; CHECK: [[cmp:%[0-9]+]] = icmp ult i32 [[p]], 3
; CHECK: [[sel:%[0-9]+]] = select i1 [[cmp]], i32 [[p]], i32 0
; CHECK: [[gep:%[0-9]+]] = getelementptr inbounds <3 x i32>, ptr addrspace(5) @__spirv_NumWorkgroups, i32 0, i32 [[sel]]
; CHECK: [[gep:%[0-9]+]] = getelementptr inbounds {{(nuw )?}}<3 x i32>, ptr addrspace(5) @__spirv_NumWorkgroups, i32 0, i32 [[sel]]
; CHECK: [[ld:%[0-9]+]] = load i32, ptr addrspace(5) [[gep]]
; CHECK: [[sel:%[0-9]+]] = select i1 [[cmp]], i32 [[ld]], i32 1
; CHECK: ret i32 [[sel]]
Expand Down

0 comments on commit 878c944

Please sign in to comment.