Skip to content

Commit

Permalink
add test case from JuliaGPU/CUDA.jl#2241
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Jun 17, 2024
1 parent 49174b2 commit 6d5768f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/compiler/AbstractInterpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,15 @@ inner52938(x, types::Type, args...; kwargs...) = x
outer52938(x) = @inline inner52938(x, Tuple{}; foo=Ref(42), bar=1)
@test fully_eliminated(outer52938, (Any,); interp=Issue52938Interp(), retval=Argument(2))

# https://github.com/JuliaGPU/CUDA.jl/issues/2241
@newinterp Cuda2241Interp
@MethodTable CUDA_2241_MT
CC.method_table(interp::Cuda2241Interp) = CC.OverlayMethodTable(CC.get_inference_world(interp), CUDA_2241_MT)
inner52938(x, types::Type, args...; kwargs...) = x
outer52938(x) = @inline inner52938(x, Tuple{}; foo=Ref(42), bar=1)
@consistent_overlay CUDA_2241_MT @inline Base.throw_boundserror(A, I) = error()
@test fully_eliminated(outer52938, (Any,); interp=Cuda2241Interp(), retval=Argument(2))

# Should not concrete-eval overlayed methods in semi-concrete interpretation
@newinterp OverlaySinInterp
@MethodTable OVERLAY_SIN_MT
Expand Down

0 comments on commit 6d5768f

Please sign in to comment.