Skip to content

Commit

Permalink
Change constantint to assertion error (#2241)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Dec 31, 2024
1 parent b66563d commit bfa1fe5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/compiler/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,9 @@ function check_ir!(@nospecialize(job::CompilerJob), errors::Vector{IRError}, imp
if occursin("inttoptr", string(dest))
# extract the literal pointer
ptr_arg = first(operands(dest))
GPUCompiler.@compiler_assert isa(ptr_arg, ConstantInt) job
if !isa(ptr_arg, ConstantInt)
throw(AssertionError("Call inst $(string(inst)) dest=$(string(dest))"))
end
ptr_val = convert(Int, ptr_arg)
ptr = Ptr{Cvoid}(ptr_val)

Expand Down

0 comments on commit bfa1fe5

Please sign in to comment.