Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IR verification error caused by exct modeling changes #52846

Closed
maleadt opened this issue Jan 10, 2024 · 1 comment · Fixed by #52853
Closed

IR verification error caused by exct modeling changes #52846

maleadt opened this issue Jan 10, 2024 · 1 comment · Fixed by #52853
Labels
compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) kind:regression Regression in behavior compared to a previous version
Milestone

Comments

@maleadt
Copy link
Member

maleadt commented Jan 10, 2024

MWE, reduced from the subtype tests:

$ julia -g2
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0-DEV.1246 (2024-01-10)
 _/ |\__'_|_|_|\__'_|  |  Commit 124ce943ef7* (0 days old master)
|__/                   |

julia> using Test

julia> issub(x,y) = x <: y

julia> function doit()
           @test issub(Array, Vector where T)
       end

julia> Base.code_ircode(doit, ())
Block 8 ends in return or unreachable, but has successors
  1 ──       nothing::Nothing
  2 ──       nothing::Nothing
  3 ──       nothing::Nothing
  4 ──       nothing::Nothing
2 5 ── %5  = enter #8
  6 ──       $(Expr(:leave, :(%5)))
  7 ──       goto #11
  8 ┄─       unreachable
  9 ──       unreachable
  10 ─       nothing::Nothing
  11 ┄ %11 = φ (#7 => $(QuoteNode(Test.Returned(false, nothing, :(#= REPL[3]:2 =#)))))::Union{Test.Returned, Test.Threw}
  │    %12 = Test.do_test::Core.Const(Test.do_test)
  │    %13 = (isa)(%11, Test.Returned)::Bool
  └───       goto #13 if not %13
  12 ─ %15 = π (%11, Test.Returned)
  │    %16 = invoke %12(%15::Test.ExecutionResult, $(QuoteNode(:(issub(Array, Vector where T))))::Any)::Union{Test.Error, Test.Fail, Test.Pass}
  └───       goto #15
  13 ─       nothing::Nothing
  14 ─ %19 = π (%11, Test.Threw)
  │    %20 = invoke %12(%19::Test.ExecutionResult, $(QuoteNode(:(issub(Array, Vector where T))))::Any)::Union{Test.Error, Test.Fail, Test.Pass}
  └───       goto #15
  15 ┄ %22 = φ (#12 => %16, #14 => %20)::Union{Test.Error, Test.Fail, Test.Pass}
  └───       return %22

Bisected to #51754, cc @Keno. Possibly related to #52808?

@maleadt maleadt added kind:regression Regression in behavior compared to a previous version compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) labels Jan 10, 2024
@maleadt maleadt added this to the 1.11 milestone Jan 10, 2024
Keno added a commit that referenced this issue Jan 10, 2024
Fixes #52846. Different unreachability checks use different definitions for
this and were inconsistenct, causing the assertion.

Since the exct modeling isn't fully plubmed through all corners of the
compiler yet, also change the caller code to force the nothrow effect
to be authoritative for the time being.
@maleadt
Copy link
Member Author

maleadt commented Jan 11, 2024

PkgEval revealed that this also gets triggered by a couple of packages (including XLSX.jl and SumOfSquares.jl).

Keno added a commit that referenced this issue Jan 11, 2024
Fixes #52846. Different unreachability checks use different definitions for
this and were inconsistenct, causing the assertion.

Since the exct modeling isn't fully plubmed through all corners of the
compiler yet, also change the caller code to force the nothrow effect
to be authoritative for the time being.
Keno added a commit that referenced this issue Jan 12, 2024
Fixes #52846. Different unreachability checks use different definitions
for this and were inconsistenct, causing the assertion.

Since the exct modeling isn't fully plubmed through all corners of the
compiler yet, also change the caller code to force the nothrow effect to
be authoritative for the time being.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) kind:regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant