-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
compiler:inferenceType inferenceType inferenceregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Description
Bisected to #31191 I haven't had any luck narrowing this down further / creating a Cassette less reproducer.
using Cassette
Cassette.@context Ctx
const ctx = Ctx()
x1 = 0
x2 = 0
f() = Cassette.overdub(ctx, Main.:*, Main.x1, Main.x2)
@assert Cassette.overdub(ctx, Main.:*, Main.x1, Main.x2) == 0
julia> @code_typed optimize=false f()
CodeInfo(
1 ─ %1 = Cassette.overdub::Core.Compiler.Const(Cassette.overdub, false)
│ %2 = Main.:*::Core.Compiler.Const(*, false)
│ %3 = Main.x1::Any
│ %4 = Main.x2::Any
│ %5 = (%1)(Main.ctx, %2, %3, %4)::Core.Compiler.Const(nothing, false)
└── return %5
) => Nothing
Previously:
julia> @code_typed optimize=false f()
CodeInfo(
1 ─ %1 = Cassette.overdub::Core.Compiler.Const(Cassette.overdub, false)
│ %2 = Main.:*::Core.Compiler.Const(*, false)
│ %3 = Main.x1::Any
│ %4 = Main.x2::Any
│ %5 = (%1)(Main.ctx, %2, %3, %4)::Core.Compiler.Const(nothing, false)
└── return %5
) => Nothing
determining the Core.Compiler.Const(nothing, false)
seems false to me. It might be a bug in how Cassette is interacting with the base compiler after #31191, but I couldn't find anything glaringly obvious.
Metadata
Metadata
Labels
compiler:inferenceType inferenceType inferenceregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version