Skip to content

Commit 1a6ff16

Browse files
authored
Fix x86 assertion (#2251)
1 parent 1389de1 commit 1a6ff16

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/compiler/validation.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,10 @@ function check_ir!(@nospecialize(job::CompilerJob), errors::Vector{IRError}, imp
500500
method_table = Core.Compiler.method_table(interp)
501501
bt = backtrace(inst)
502502
dest = called_operand(inst)
503+
if isa(dest, LLVM.ConstantExpr) && opcode(dest) == LLVM.API.LLVMIntToPtr && isa(operands(dest)[1], LLVM.ConstantExpr) && opcode(operands(dest)[1]) == LLVM.API.LLVMPtrToInt
504+
dest = operands(operands(dest)[1])[1]
505+
end
506+
503507
if isa(dest, LLVM.Function)
504508
fn = LLVM.name(dest)
505509

0 commit comments

Comments
 (0)