Skip to content

Commit 8c36d7f

Browse files
authored
[NFC] Check for ptrtoadd instead of ptrtoint (#3605)
Adjustment is required after llvm/llvm-project@34a61e3
1 parent 9b0d02a commit 8c36d7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/transcoding/ptr_diff.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ define spir_kernel void @test(float %a) local_unnamed_addr #0 {
4343
entry:
4444
%0 = alloca float, align 4
4545
store float %a, ptr %0, align 4
46-
; CHECK-LLVM: %[[#Arg1:]] = ptrtoint ptr %[[#]] to i64
47-
; CHECK-LLVM: %[[#Arg2:]] = ptrtoint ptr %[[#]] to i64
46+
; CHECK-LLVM: %[[#Arg1:]] = ptrtoaddr ptr %[[#]] to i64
47+
; CHECK-LLVM: %[[#Arg2:]] = ptrtoaddr ptr %[[#]] to i64
4848
; CHECK-LLVM: %[[#Sub:]] = sub i64 %[[#Arg1]], %[[#Arg2]]
49-
; CHECK-LLVM: sdiv exact i64 %[[#Sub]], ptrtoint (ptr getelementptr (float, ptr null, i32 1) to i64)
49+
; CHECK-LLVM: sdiv exact i64 %[[#Sub]], 4
5050
%1 = call spir_func noundef i32 @_Z15__spirv_PtrDiff(ptr %0, ptr %0)
5151
ret void
5252
}

0 commit comments

Comments
 (0)