Skip to content

Commit

Permalink
Fix x86 assertion (#2251)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Jan 5, 2025
1 parent 1389de1 commit 1a6ff16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/compiler/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,10 @@ function check_ir!(@nospecialize(job::CompilerJob), errors::Vector{IRError}, imp
method_table = Core.Compiler.method_table(interp)
bt = backtrace(inst)
dest = called_operand(inst)
if isa(dest, LLVM.ConstantExpr) && opcode(dest) == LLVM.API.LLVMIntToPtr && isa(operands(dest)[1], LLVM.ConstantExpr) && opcode(operands(dest)[1]) == LLVM.API.LLVMPtrToInt
dest = operands(operands(dest)[1])[1]
end

if isa(dest, LLVM.Function)
fn = LLVM.name(dest)

Expand Down

0 comments on commit 1a6ff16

Please sign in to comment.