Skip to content

Commit 2cbc107

Browse files
committed
Fix opaque type of state getter.
1 parent 623d204 commit 2cbc107

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/irgen.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ function add_kernel_state!(@nospecialize(job::CompilerJob), mod::LLVM.Module,
572572
state_intr = if haskey(functions(mod), "julia.gpu.state_getter")
573573
functions(mod)["julia.gpu.state_getter"]
574574
else
575-
LLVM.Function(mod, "julia.gpu.state_getter", LLVM.FunctionType(T_int8))
575+
LLVM.Function(mod, "julia.gpu.state_getter", LLVM.FunctionType(T_pint8))
576576
end
577577
push!(function_attributes(state_intr), EnumAttribute("readnone", 0; ctx))
578578

@@ -709,7 +709,7 @@ function add_kernel_state!(@nospecialize(job::CompilerJob), mod::LLVM.Module,
709709
f = LLVM.parent(bb)
710710

711711
state = parameters(f)[1]
712-
state = bitcast!(builder, state, T_int8)
712+
state = bitcast!(builder, state, T_pint8)
713713
replace_uses!(inst, state)
714714

715715
@assert isempty(uses(inst))

0 commit comments

Comments
 (0)