Skip to content

Commit f926300

Browse files
committed
Fix wrong type of rewritten ptrtoint constexprs.
1 parent edc6073 commit f926300

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/irgen.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,9 @@ function add_kernel_state!(@nospecialize(job::CompilerJob), mod::LLVM.Module,
606606
# use a value materializer for replacing uses of the function in constants
607607
function materializer(val)
608608
if val isa LLVM.ConstantExpr && opcode(val) == LLVM.API.LLVMPtrToInt
609-
val = operands(val)[1]
610-
if haskey(workmap, val)
611-
return LLVM.const_ptrtoint(workmap[val], llvmtype(val))
609+
src = operands(val)[1]
610+
if haskey(workmap, src)
611+
return LLVM.const_ptrtoint(workmap[src], llvmtype(val))
612612
end
613613
end
614614
return val

0 commit comments

Comments
 (0)