Genify.jl icon indicating copy to clipboard operation
Genify.jl copied to clipboard

`unpack_tuple` not sufficiently general

Open femtomc opened this issue 5 years ago • 1 comments

Misses this case in IR:

 %6 = Main.AutoAddressing2.Jaynes.trace(%18, Main.AutoAddressing2.Jaynes.flatten, %5)
  %7 = Base.getindex(%6, 1)
  %8 = Base.lastindex(%6)
  %9 = 2:%8
  %10 = Base.getindex(%6, %9)
  %11 = Core._apply_iterate(Base.iterate, Main.AutoAddressing2.Jaynes.simulate, %10)

Here, the variable will hold a tuple after the call to getindex - but it can't be checked statically with the current unpack_tuple checks.

femtomc avatar Oct 20 '20 19:10 femtomc

I think I fixed this with the most recent commit, but I'm not sure how to construct a test case -- let me know if you have one!

ztangent avatar Nov 03 '20 19:11 ztangent