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

Error with phi or function boundaries #2122

Open
jgreener64 opened this issue Nov 26, 2024 · 2 comments
Open

Error with phi or function boundaries #2122

jgreener64 opened this issue Nov 26, 2024 · 2 comments

Comments

@jgreener64
Copy link
Contributor

I am on Enzyme main (d096464), StaticArrays 1.9.8 and Julia 1.10.6. This is a rather long example but it is self-contained, I found it hard to trim it down. I could get rid of the error in a few ways, for example by removing norm or inlining some functions, but nothing I tried fixed it in the larger codebase. The full error is attached as error.txt.

using Enzyme, StaticArrays, LinearAlgebra

struct A{T}
    f1::T
end

struct PeriodicTorsion{N, T, E}
    periodicities::NTuple{N, Int}
    phases::NTuple{N, T}
    ks::NTuple{N, E}
    proper::Bool
end

struct InteractionList4Atoms{I, T}
    is::I
    js::I
    ks::I
    ls::I
    inters::T
    types::Vector{String}
end

dict_get(dic, key, default) = haskey(dic, key) ? dic[key] : default

function inject_interaction(inter::PeriodicTorsion{N, T, E}, inter_type, params_dic) where {N, T, E}
    key_prefix = "inter_PT_$(inter_type)_"
    return PeriodicTorsion{N, T, E}(
        inter.periodicities,
        ntuple(i -> dict_get(params_dic, key_prefix * "phase_$i", inter.phases[i]), N),
        ntuple(i -> dict_get(params_dic, key_prefix * "k_$i"    , inter.ks[i]    ), N),
        inter.proper,
    )
end

function periodic_torsion_vectors(coords_i, coords_j, coords_k, coords_l)
    ab = coords_j - coords_i
    bc = coords_k - coords_j
    cross_ab_bc = ab × bc
    bc_norm = norm(bc)
    return ab, bc, cross_ab_bc, bc_norm
end

function specific_forces!(fs_nounits, coords, sils_4_atoms)
    for inter_list in sils_4_atoms
        for ind in 1:length(inter_list.is)
            i, j, k, l, d = inter_list.is[ind], inter_list.js[ind], inter_list.ks[ind],
                                inter_list.ls[ind], inter_list.inters[ind]
            ab, bc, cross_ab_bc, bc_norm = periodic_torsion_vectors(
                        coords[i], coords[j], coords[k], coords[l])
            fi = d.ks[1] * bc_norm * cross_ab_bc
            sf = A(fi)
            fs_nounits[i] += sf.f1
        end
    end
    return fs_nounits
end

function inject_inter_list(inter, params_dic)
    inters_grad = inject_interaction.(inter.inters, inter.types, (params_dic,))
    InteractionList4Atoms(inter.is, inter.js, inter.ks, inter.ls, inters_grad, inter.types)
end

function test_forces_grad(params_dic, sis_in, coords)
    sis = inject_inter_list.(sis_in, (params_dic,))
    fs_nounits = zero(coords)
    sis2 = A(sis)
    fill!(fs_nounits, zero(eltype(fs_nounits)))
    sils_4_atoms = filter(il -> il isa InteractionList4Atoms, values(sis2.f1))
    specific_forces!(fs_nounits, coords, sils_4_atoms)
    return sum(sum.(abs, fs_nounits))
end

params_dic = Dict("inter_PT_-/C/N/-_k_1" => -10.46)
grads_enzyme = Dict(k => 0.0 for k in keys(params_dic))

pt1 = [
    PeriodicTorsion((1, 1), (1.0, 1.0), (1.0, 1.0), true),
    PeriodicTorsion((1, 1), (1.0, 1.0), (1.0, 1.0), true),
]
sis = (
    InteractionList4Atoms([1, 2], [2, 3], [3, 4], [4, 5], pt1, ["", ""]),
    InteractionList4Atoms([1, 2], [2, 3], [3, 4], [4, 5], pt1, ["", ""]),
)
coords = rand(SVector{3, Float64}, 5)

test_forces_grad(params_dic, sis, coords) # Works

autodiff(
    set_runtime_activity(Reverse),
    test_forces_grad,
    Active,
    Duplicated(params_dic, grads_enzyme),
    Const(sis),
    Duplicated(copy(coords), zero(coords)),
)
ERROR: LoadError: Enzyme compilation failed.
Current scope: 
; Function Attrs: mustprogress willreturn
define internal fastcc void @preprocess_julia_specific_forces__3670({} addrspace(10)* noundef nonnull align 16 dereferenceable(40) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" "enzymejl_parmtype"="140582344946832" "enzymejl_parmtype_ref"="2" %0, {} addrspace(10)* noundef nonnull align 16 dereferenceable(40) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" "enzymejl_parmtype"="140582344946832" "enzymejl_parmtype_ref"="2" %1, [2 x [6 x {} addrspace(10)*]] addrspace(11)* nocapture noundef nonnull readonly align 8 dereferenceable(96) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Integer, [-1,0,9]:Integer, [-1,0,10]:Integer, [-1,0,11]:Integer, [-1,0,12]:Integer, [-1,0,13]:Integer, [-1,0,14]:Integer, [-1,0,15]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,0,24]:Integer, [-1,0,25]:Integer, [-1,0,26]:Integer, [-1,0,27]:Integer, [-1,0,28]:Integer, [-1,0,29]:Integer, [-1,0,30]:Integer, [-1,0,31]:Integer, [-1,0,32]:Integer, [-1,0,33]:Integer, [-1,0,34]:Integer, [-1,0,35]:Integer, [-1,0,36]:Integer, [-1,0,37]:Integer, [-1,0,38]:Integer, [-1,0,39]:Integer, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]:Integer, [-1,8,8]:Integer, [-1,8,9]:Integer, [-1,8,10]:Integer, [-1,8,11]:Integer, [-1,8,12]:Integer, [-1,8,13]:Integer, [-1,8,14]:Integer, [-1,8,15]:Integer, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,-1]:Integer, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,-1]:Integer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Pointer, [-1,32,0]:Pointer, [-1,32,0,0]:Integer, [-1,32,0,1]:Integer, [-1,32,0,2]:Integer, [-1,32,0,3]:Integer, [-1,32,0,4]:Integer, [-1,32,0,5]:Integer, [-1,32,0,6]:Integer, [-1,32,0,7]:Integer, [-1,32,0,8]:Integer, [-1,32,0,9]:Integer, [-1,32,0,10]:Integer, [-1,32,0,11]:Integer, [-1,32,0,12]:Integer, [-1,32,0,13]:Integer, [-1,32,0,14]:Integer, [-1,32,0,15]:Integer, [-1,32,0,16]:Float@double, [-1,32,0,24]:Float@double, [-1,32,0,32]:Float@double, [-1,32,0,40]:Float@double, [-1,32,0,48]:Integer, [-1,32,8]:Integer, [-1,32,9]:Integer, [-1,32,10]:Integer, [-1,32,11]:Integer, [-1,32,12]:Integer, [-1,32,13]:Integer, [-1,32,14]:Integer, [-1,32,15]:Integer, [-1,32,16]:Integer, [-1,32,17]:Integer, [-1,32,18]:Integer, [-1,32,19]:Integer, [-1,32,20]:Integer, [-1,32,21]:Integer, [-1,32,22]:Integer, [-1,32,23]:Integer, [-1,32,24]:Integer, [-1,32,25]:Integer, [-1,32,26]:Integer, [-1,32,27]:Integer, [-1,32,28]:Integer, [-1,32,29]:Integer, [-1,32,30]:Integer, [-1,32,31]:Integer, [-1,32,32]:Integer, [-1,32,33]:Integer, [-1,32,34]:Integer, [-1,32,35]:Integer, [-1,32,36]:Integer, [-1,32,37]:Integer, [-1,32,38]:Integer, [-1,32,39]:Integer, [-1,40]:Pointer, [-1,40,0]:Pointer, [-1,40,0,0]:Pointer, [-1,40,8]:Integer, [-1,40,9]:Integer, [-1,40,10]:Integer, [-1,40,11]:Integer, [-1,40,12]:Integer, [-1,40,13]:Integer, [-1,40,14]:Integer, [-1,40,15]:Integer, [-1,40,16]:Integer, [-1,40,17]:Integer, [-1,40,18]:Integer, [-1,40,19]:Integer, [-1,40,20]:Integer, [-1,40,21]:Integer, [-1,40,22]:Integer, [-1,40,23]:Integer, [-1,40,24]:Integer, [-1,40,25]:Integer, [-1,40,26]:Integer, [-1,40,27]:Integer, [-1,40,28]:Integer, [-1,40,29]:Integer, [-1,40,30]:Integer, [-1,40,31]:Integer, [-1,40,32]:Integer, [-1,40,33]:Integer, [-1,40,34]:Integer, [-1,40,35]:Integer, [-1,40,36]:Integer, [-1,40,37]:Integer, [-1,40,38]:Integer, [-1,40,39]:Integer, [-1,48]:Pointer, [-1,48,0]:Pointer, [-1,48,0,-1]:Integer, [-1,48,8]:Integer, [-1,48,9]:Integer, [-1,48,10]:Integer, [-1,48,11]:Integer, [-1,48,12]:Integer, [-1,48,13]:Integer, [-1,48,14]:Integer, [-1,48,15]:Integer, [-1,48,16]:Integer, [-1,48,17]:Integer, [-1,48,18]:Integer, [-1,48,19]:Integer, [-1,48,20]:Integer, [-1,48,21]:Integer, [-1,48,22]:Integer, [-1,48,23]:Integer, [-1,48,24]:Integer, [-1,48,25]:Integer, [-1,48,26]:Integer, [-1,48,27]:Integer, [-1,48,28]:Integer, [-1,48,29]:Integer, [-1,48,30]:Integer, [-1,48,31]:Integer, [-1,48,32]:Integer, [-1,48,33]:Integer, [-1,48,34]:Integer, [-1,48,35]:Integer, [-1,48,36]:Integer, [-1,48,37]:Integer, [-1,48,38]:Integer, [-1,48,39]:Integer, [-1,56]:Pointer, [-1,56,0]:Pointer, [-1,56,0,-1]:Integer, [-1,56,8]:Integer, [-1,56,9]:Integer, [-1,56,10]:Integer, [-1,56,11]:Integer, [-1,56,12]:Integer, [-1,56,13]:Integer, [-1,56,14]:Integer, [-1,56,15]:Integer, [-1,56,16]:Integer, [-1,56,17]:Integer, [-1,56,18]:Integer, [-1,56,19]:Integer, [-1,56,20]:Integer, [-1,56,21]:Integer, [-1,56,22]:Integer, [-1,56,23]:Integer, [-1,56,24]:Integer, [-1,56,25]:Integer, [-1,56,26]:Integer, [-1,56,27]:Integer, [-1,56,28]:Integer, [-1,56,29]:Integer, [-1,56,30]:Integer, [-1,56,31]:Integer, [-1,56,32]:Integer, [-1,56,33]:Integer, [-1,56,34]:Integer, [-1,56,35]:Integer, [-1,56,36]:Integer, [-1,56,37]:Integer, [-1,56,38]:Integer, [-1,56,39]:Integer, [-1,64]:Pointer, [-1,64,0]:Pointer, [-1,64,0,-1]:Integer, [-1,64,8]:Integer, [-1,64,9]:Integer, [-1,64,10]:Integer, [-1,64,11]:Integer, [-1,64,12]:Integer, [-1,64,13]:Integer, [-1,64,14]:Integer, [-1,64,15]:Integer, [-1,64,16]:Integer, [-1,64,17]:Integer, [-1,64,18]:Integer, [-1,64,19]:Integer, [-1,64,20]:Integer, [-1,64,21]:Integer, [-1,64,22]:Integer, [-1,64,23]:Integer, [-1,64,24]:Integer, [-1,64,25]:Integer, [-1,64,26]:Integer, [-1,64,27]:Integer, [-1,64,28]:Integer, [-1,64,29]:Integer, [-1,64,30]:Integer, [-1,64,31]:Integer, [-1,64,32]:Integer, [-1,64,33]:Integer, [-1,64,34]:Integer, [-1,64,35]:Integer, [-1,64,36]:Integer, [-1,64,37]:Integer, [-1,64,38]:Integer, [-1,64,39]:Integer, [-1,72]:Pointer, [-1,72,0]:Pointer, [-1,72,0,-1]:Integer, [-1,72,8]:Integer, [-1,72,9]:Integer, [-1,72,10]:Integer, [-1,72,11]:Integer, [-1,72,12]:Integer, [-1,72,13]:Integer, [-1,72,14]:Integer, [-1,72,15]:Integer, [-1,72,16]:Integer, [-1,72,17]:Integer, [-1,72,18]:Integer, [-1,72,19]:Integer, [-1,72,20]:Integer, [-1,72,21]:Integer, [-1,72,22]:Integer, [-1,72,23]:Integer, [-1,72,24]:Integer, [-1,72,25]:Integer, [-1,72,26]:Integer, [-1,72,27]:Integer, [-1,72,28]:Integer, [-1,72,29]:Integer, [-1,72,30]:Integer, [-1,72,31]:Integer, [-1,72,32]:Integer, [-1,72,33]:Integer, [-1,72,34]:Integer, [-1,72,35]:Integer, [-1,72,36]:Integer, [-1,72,37]:Integer, [-1,72,38]:Integer, [-1,72,39]:Integer, [-1,80]:Pointer, [-1,80,0]:Pointer, [-1,80,0,0]:Integer, [-1,80,0,1]:Integer, [-1,80,0,2]:Integer, [-1,80,0,3]:Integer, [-1,80,0,4]:Integer, [-1,80,0,5]:Integer, [-1,80,0,6]:Integer, [-1,80,0,7]:Integer, [-1,80,0,8]:Integer, [-1,80,0,9]:Integer, [-1,80,0,10]:Integer, [-1,80,0,11]:Integer, [-1,80,0,12]:Integer, [-1,80,0,13]:Integer, [-1,80,0,14]:Integer, [-1,80,0,15]:Integer, [-1,80,0,16]:Float@double, [-1,80,0,24]:Float@double, [-1,80,0,32]:Float@double, [-1,80,0,40]:Float@double, [-1,80,0,48]:Integer, [-1,80,8]:Integer, [-1,80,9]:Integer, [-1,80,10]:Integer, [-1,80,11]:Integer, [-1,80,12]:Integer, [-1,80,13]:Integer, [-1,80,14]:Integer, [-1,80,15]:Integer, [-1,80,16]:Integer, [-1,80,17]:Integer, [-1,80,18]:Integer, [-1,80,19]:Integer, [-1,80,20]:Integer, [-1,80,21]:Integer, [-1,80,22]:Integer, [-1,80,23]:Integer, [-1,80,24]:Integer, [-1,80,25]:Integer, [-1,80,26]:Integer, [-1,80,27]:Integer, [-1,80,28]:Integer, [-1,80,29]:Integer, [-1,80,30]:Integer, [-1,80,31]:Integer, [-1,80,32]:Integer, [-1,80,33]:Integer, [-1,80,34]:Integer, [-1,80,35]:Integer, [-1,80,36]:Integer, [-1,80,37]:Integer, [-1,80,38]:Integer, [-1,80,39]:Integer, [-1,88]:Pointer, [-1,88,0]:Pointer, [-1,88,0,0]:Pointer, [-1,88,8]:Integer, [-1,88,9]:Integer, [-1,88,10]:Integer, [-1,88,11]:Integer, [-1,88,12]:Integer, [-1,88,13]:Integer, [-1,88,14]:Integer, [-1,88,15]:Integer, [-1,88,16]:Integer, [-1,88,17]:Integer, [-1,88,18]:Integer, [-1,88,19]:Integer, [-1,88,20]:Integer, [-1,88,21]:Integer, [-1,88,22]:Integer, [-1,88,23]:Integer, [-1,88,24]:Integer, [-1,88,25]:Integer, [-1,88,26]:Integer, [-1,88,27]:Integer, [-1,88,28]:Integer, [-1,88,29]:Integer, [-1,88,30]:Integer, [-1,88,31]:Integer, [-1,88,32]:Integer, [-1,88,33]:Integer, [-1,88,34]:Integer, [-1,88,35]:Integer, [-1,88,36]:Integer, [-1,88,37]:Integer, [-1,88,38]:Integer, [-1,88,39]:Integer}" "enzymejl_parmtype"="140582344938640" "enzymejl_parmtype_ref"="1" %2) unnamed_addr #25 !dbg !1321 {

[...]

pass:                                             ; preds = %L83
  %88 = add nsw i64 %30, -1, !dbg !1363
  %89 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, !dbg !1363
  %90 = add nuw nsw i64 %30, 1, !dbg !1364
  %.not159 = icmp eq [6 x {} addrspace(10)*] addrspace(11)* %89, null, !dbg !1361
  br i1 %.not159, label %L94, label %guard_pass122, !dbg !1361

guard_pass122:                                    ; preds = %pass
  %unbox124.elt = getelementptr inbounds [6 x {} addrspace(10)*], [6 x {} addrspace(10)*] addrspace(11)* %89, i64 0, i64 0, !dbg !1361
  %unbox124.unpack = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %91 = insertvalue [6 x {} addrspace(10)*] undef, {} addrspace(10)* %unbox124.unpack, 0, !dbg !1361
  %unbox124.elt160 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 1, !dbg !1361
  %unbox124.unpack161 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt160, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %92 = insertvalue [6 x {} addrspace(10)*] %91, {} addrspace(10)* %unbox124.unpack161, 1, !dbg !1361
  %unbox124.elt162 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 2, !dbg !1361
  %unbox124.unpack163 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt162, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %93 = insertvalue [6 x {} addrspace(10)*] %92, {} addrspace(10)* %unbox124.unpack163, 2, !dbg !1361
  %unbox124.elt164 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 3, !dbg !1361
  %unbox124.unpack165 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt164, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %94 = insertvalue [6 x {} addrspace(10)*] %93, {} addrspace(10)* %unbox124.unpack165, 3, !dbg !1361
  %unbox124.elt166 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 4, !dbg !1361
  %unbox124.unpack167 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt166, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %95 = insertvalue [6 x {} addrspace(10)*] %94, {} addrspace(10)* %unbox124.unpack167, 4, !dbg !1361
  %unbox124.elt168 = getelementptr inbounds [2 x [6 x {} addrspace(10)*]], [2 x [6 x {} addrspace(10)*]] addrspace(11)* %2, i64 0, i64 %88, i64 5, !dbg !1361
  %unbox124.unpack169 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox124.elt168, align 8, !dbg !1361, !tbaa !22, !alias.scope !33, !noalias !36, !enzyme_type !284
  %unbox124170 = insertvalue [6 x {} addrspace(10)*] %95, {} addrspace(10)* %unbox124.unpack169, 5, !dbg !1361
  br label %L94, !dbg !1361
}

Illegal replace ficticious phi for:   %unbox117.unpack141_replacementA = phi {} addrspace(10)*  of   %unbox117.unpack141 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox117.elt140, align 8, !enzyme_inactive !0, !enzyme_type !26, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BInt64\7D !0
; Function Attrs: mustprogress willreturn
define internal fastcc void @diffejulia_specific_forces__3670({} addrspace(10)* align 16 dereferenceable(40) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" "enzymejl_parmtype"="140582344946832" "enzymejl_parmtype_ref"="2" %0, {} addrspace(10)* align 16 "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" "enzymejl_parmtype"="140582344946832" "enzymejl_parmtype_ref"="2" %"'", {} addrspace(10)* align 16 dereferenceable(40) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" "enzymejl_parmtype"="140582344946832" "enzymejl_parmtype_ref"="2" %1, {} addrspace(10)* align 16 "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}" "enzymejl_parmtype"="140582344946832" "enzymejl_parmtype_ref"="2" %"'1", [2 x [6 x {} addrspace(10)*]] addrspace(11)* nocapture readonly align 8 dereferenceable(96) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Integer, [-1,0,9]:Integer, [-1,0,10]:Integer, [-1,0,11]:Integer, [-1,0,12]:Integer, [-1,0,13]:Integer, [-1,0,14]:Integer, [-1,0,15]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,0,24]:Integer, [-1,0,25]:Integer, [-1,0,26]:Integer, [-1,0,27]:Integer, [-1,0,28]:Integer, [-1,0,29]:Integer, [-1,0,30]:Integer, [-1,0,31]:Integer, [-1,0,32]:Integer, [-1,0,33]:Integer, [-1,0,34]:Integer, [-1,0,35]:Integer, [-1,0,36]:Integer, [-1,0,37]:Integer, [-1,0,38]:Integer, [-1,0,39]:Integer, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]:Integer, [-1,8,8]:Integer, [-1,8,9]:Integer, [-1,8,10]:Integer, [-1,8,11]:Integer, [-1,8,12]:Integer, [-1,8,13]:Integer, [-1,8,14]:Integer, [-1,8,15]:Integer, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,-1]:Integer, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,-1]:Integer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Pointer, [-1,32,0]:Pointer, [-1,32,0,0]:Integer, [-1,32,0,1]:Integer, [-1,32,0,2]:Integer, [-1,32,0,3]:Integer, [-1,32,0,4]:Integer, [-1,32,0,5]:Integer, [-1,32,0,6]:Integer, [-1,32,0,7]:Integer, [-1,32,0,8]:Integer, [-1,32,0,9]:Integer, [-1,32,0,10]:Integer, [-1,32,0,11]:Integer, [-1,32,0,12]:Integer, [-1,32,0,13]:Integer, [-1,32,0,14]:Integer, [-1,32,0,15]:Integer, [-1,32,0,16]:Float@double, [-1,32,0,24]:Float@double, [-1,32,0,32]:Float@double, [-1,32,0,40]:Float@double, [-1,32,0,48]:Integer, [-1,32,8]:Integer, [-1,32,9]:Integer, [-1,32,10]:Integer, [-1,32,11]:Integer, [-1,32,12]:Integer, [-1,32,13]:Integer, [-1,32,14]:Integer, [-1,32,15]:Integer, [-1,32,16]:Integer, [-1,32,17]:Integer, [-1,32,18]:Integer, [-1,32,19]:Integer, [-1,32,20]:Integer, [-1,32,21]:Integer, [-1,32,22]:Integer, [-1,32,23]:Integer, [-1,32,24]:Integer, [-1,32,25]:Integer, [-1,32,26]:Integer, [-1,32,27]:Integer, [-1,32,28]:Integer, [-1,32,29]:Integer, [-1,32,30]:Integer, [-1,32,31]:Integer, [-1,32,32]:Integer, [-1,32,33]:Integer, [-1,32,34]:Integer, [-1,32,35]:Integer, [-1,32,36]:Integer, [-1,32,37]:Integer, [-1,32,38]:Integer, [-1,32,39]:Integer, [-1,40]:Pointer, [-1,40,0]:Pointer, [-1,40,0,0]:Pointer, [-1,40,8]:Integer, [-1,40,9]:Integer, [-1,40,10]:Integer, [-1,40,11]:Integer, [-1,40,12]:Integer, [-1,40,13]:Integer, [-1,40,14]:Integer, [-1,40,15]:Integer, [-1,40,16]:Integer, [-1,40,17]:Integer, [-1,40,18]:Integer, [-1,40,19]:Integer, [-1,40,20]:Integer, [-1,40,21]:Integer, [-1,40,22]:Integer, [-1,40,23]:Integer, [-1,40,24]:Integer, [-1,40,25]:Integer, [-1,40,26]:Integer, [-1,40,27]:Integer, [-1,40,28]:Integer, [-1,40,29]:Integer, [-1,40,30]:Integer, [-1,40,31]:Integer, [-1,40,32]:Integer, [-1,40,33]:Integer, [-1,40,34]:Integer, [-1,40,35]:Integer, [-1,40,36]:Integer, [-1,40,37]:Integer, [-1,40,38]:Integer, [-1,40,39]:Integer, [-1,48]:Pointer, [-1,48,0]:Pointer, [-1,48,0,-1]:Integer, [-1,48,8]:Integer, [-1,48,9]:Integer, [-1,48,10]:Integer, [-1,48,11]:Integer, [-1,48,12]:Integer, [-1,48,13]:Integer, [-1,48,14]:Integer, [-1,48,15]:Integer, [-1,48,16]:Integer, [-1,48,17]:Integer, [-1,48,18]:Integer, [-1,48,19]:Integer, [-1,48,20]:Integer, [-1,48,21]:Integer, [-1,48,22]:Integer, [-1,48,23]:Integer, [-1,48,24]:Integer, [-1,48,25]:Integer, [-1,48,26]:Integer, [-1,48,27]:Integer, [-1,48,28]:Integer, [-1,48,29]:Integer, [-1,48,30]:Integer, [-1,48,31]:Integer, [-1,48,32]:Integer, [-1,48,33]:Integer, [-1,48,34]:Integer, [-1,48,35]:Integer, [-1,48,36]:Integer, [-1,48,37]:Integer, [-1,48,38]:Integer, [-1,48,39]:Integer, [-1,56]:Pointer, [-1,56,0]:Pointer, [-1,56,0,-1]:Integer, [-1,56,8]:Integer, [-1,56,9]:Integer, [-1,56,10]:Integer, [-1,56,11]:Integer, [-1,56,12]:Integer, [-1,56,13]:Integer, [-1,56,14]:Integer, [-1,56,15]:Integer, [-1,56,16]:Integer, [-1,56,17]:Integer, [-1,56,18]:Integer, [-1,56,19]:Integer, [-1,56,20]:Integer, [-1,56,21]:Integer, [-1,56,22]:Integer, [-1,56,23]:Integer, [-1,56,24]:Integer, [-1,56,25]:Integer, [-1,56,26]:Integer, [-1,56,27]:Integer, [-1,56,28]:Integer, [-1,56,29]:Integer, [-1,56,30]:Integer, [-1,56,31]:Integer, [-1,56,32]:Integer, [-1,56,33]:Integer, [-1,56,34]:Integer, [-1,56,35]:Integer, [-1,56,36]:Integer, [-1,56,37]:Integer, [-1,56,38]:Integer, [-1,56,39]:Integer, [-1,64]:Pointer, [-1,64,0]:Pointer, [-1,64,0,-1]:Integer, [-1,64,8]:Integer, [-1,64,9]:Integer, [-1,64,10]:Integer, [-1,64,11]:Integer, [-1,64,12]:Integer, [-1,64,13]:Integer, [-1,64,14]:Integer, [-1,64,15]:Integer, [-1,64,16]:Integer, [-1,64,17]:Integer, [-1,64,18]:Integer, [-1,64,19]:Integer, [-1,64,20]:Integer, [-1,64,21]:Integer, [-1,64,22]:Integer, [-1,64,23]:Integer, [-1,64,24]:Integer, [-1,64,25]:Integer, [-1,64,26]:Integer, [-1,64,27]:Integer, [-1,64,28]:Integer, [-1,64,29]:Integer, [-1,64,30]:Integer, [-1,64,31]:Integer, [-1,64,32]:Integer, [-1,64,33]:Integer, [-1,64,34]:Integer, [-1,64,35]:Integer, [-1,64,36]:Integer, [-1,64,37]:Integer, [-1,64,38]:Integer, [-1,64,39]:Integer, [-1,72]:Pointer, [-1,72,0]:Pointer, [-1,72,0,-1]:Integer, [-1,72,8]:Integer, [-1,72,9]:Integer, [-1,72,10]:Integer, [-1,72,11]:Integer, [-1,72,12]:Integer, [-1,72,13]:Integer, [-1,72,14]:Integer, [-1,72,15]:Integer, [-1,72,16]:Integer, [-1,72,17]:Integer, [-1,72,18]:Integer, [-1,72,19]:Integer, [-1,72,20]:Integer, [-1,72,21]:Integer, [-1,72,22]:Integer, [-1,72,23]:Integer, [-1,72,24]:Integer, [-1,72,25]:Integer, [-1,72,26]:Integer, [-1,72,27]:Integer, [-1,72,28]:Integer, [-1,72,29]:Integer, [-1,72,30]:Integer, [-1,72,31]:Integer, [-1,72,32]:Integer, [-1,72,33]:Integer, [-1,72,34]:Integer, [-1,72,35]:Integer, [-1,72,36]:Integer, [-1,72,37]:Integer, [-1,72,38]:Integer, [-1,72,39]:Integer, [-1,80]:Pointer, [-1,80,0]:Pointer, [-1,80,0,0]:Integer, [-1,80,0,1]:Integer, [-1,80,0,2]:Integer, [-1,80,0,3]:Integer, [-1,80,0,4]:Integer, [-1,80,0,5]:Integer, [-1,80,0,6]:Integer, [-1,80,0,7]:Integer, [-1,80,0,8]:Integer, [-1,80,0,9]:Integer, [-1,80,0,10]:Integer, [-1,80,0,11]:Integer, [-1,80,0,12]:Integer, [-1,80,0,13]:Integer, [-1,80,0,14]:Integer, [-1,80,0,15]:Integer, [-1,80,0,16]:Float@double, [-1,80,0,24]:Float@double, [-1,80,0,32]:Float@double, [-1,80,0,40]:Float@double, [-1,80,0,48]:Integer, [-1,80,8]:Integer, [-1,80,9]:Integer, [-1,80,10]:Integer, [-1,80,11]:Integer, [-1,80,12]:Integer, [-1,80,13]:Integer, [-1,80,14]:Integer, [-1,80,15]:Integer, [-1,80,16]:Integer, [-1,80,17]:Integer, [-1,80,18]:Integer, [-1,80,19]:Integer, [-1,80,20]:Integer, [-1,80,21]:Integer, [-1,80,22]:Integer, [-1,80,23]:Integer, [-1,80,24]:Integer, [-1,80,25]:Integer, [-1,80,26]:Integer, [-1,80,27]:Integer, [-1,80,28]:Integer, [-1,80,29]:Integer, [-1,80,30]:Integer, [-1,80,31]:Integer, [-1,80,32]:Integer, [-1,80,33]:Integer, [-1,80,34]:Integer, [-1,80,35]:Integer, [-1,80,36]:Integer, [-1,80,37]:Integer, [-1,80,38]:Integer, [-1,80,39]:Integer, [-1,88]:Pointer, [-1,88,0]:Pointer, [-1,88,0,0]:Pointer, [-1,88,8]:Integer, [-1,88,9]:Integer, [-1,88,10]:Integer, [-1,88,11]:Integer, [-1,88,12]:Integer, [-1,88,13]:Integer, [-1,88,14]:Integer, [-1,88,15]:Integer, [-1,88,16]:Integer, [-1,88,17]:Integer, [-1,88,18]:Integer, [-1,88,19]:Integer, [-1,88,20]:Integer, [-1,88,21]:Integer, [-1,88,22]:Integer, [-1,88,23]:Integer, [-1,88,24]:Integer, [-1,88,25]:Integer, [-1,88,26]:Integer, [-1,88,27]:Integer, [-1,88,28]:Integer, [-1,88,29]:Integer, [-1,88,30]:Integer, [-1,88,31]:Integer, [-1,88,32]:Integer, [-1,88,33]:Integer, [-1,88,34]:Integer, [-1,88,35]:Integer, [-1,88,36]:Integer, [-1,88,37]:Integer, [-1,88,38]:Integer, [-1,88,39]:Integer}" "enzymejl_parmtype"="140582344938640" "enzymejl_parmtype_ref"="1" %2, [2 x [6 x {} addrspace(10)*]] addrspace(11)* nocapture align 8 "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Pointer, [-1,0,0,-1]:Integer, [-1,0,8]:Integer, [-1,0,9]:Integer, [-1,0,10]:Integer, [-1,0,11]:Integer, [-1,0,12]:Integer, [-1,0,13]:Integer, [-1,0,14]:Integer, [-1,0,15]:Integer, [-1,0,16]:Integer, [-1,0,17]:Integer, [-1,0,18]:Integer, [-1,0,19]:Integer, [-1,0,20]:Integer, [-1,0,21]:Integer, [-1,0,22]:Integer, [-1,0,23]:Integer, [-1,0,24]:Integer, [-1,0,25]:Integer, [-1,0,26]:Integer, [-1,0,27]:Integer, [-1,0,28]:Integer, [-1,0,29]:Integer, [-1,0,30]:Integer, [-1,0,31]:Integer, [-1,0,32]:Integer, [-1,0,33]:Integer, [-1,0,34]:Integer, [-1,0,35]:Integer, [-1,0,36]:Integer, [-1,0,37]:Integer, [-1,0,38]:Integer, [-1,0,39]:Integer, [-1,8]:Pointer, [-1,8,0]:Pointer, [-1,8,0,-1]:Integer, [-1,8,8]:Integer, [-1,8,9]:Integer, [-1,8,10]:Integer, [-1,8,11]:Integer, [-1,8,12]:Integer, [-1,8,13]:Integer, [-1,8,14]:Integer, [-1,8,15]:Integer, [-1,8,16]:Integer, [-1,8,17]:Integer, [-1,8,18]:Integer, [-1,8,19]:Integer, [-1,8,20]:Integer, [-1,8,21]:Integer, [-1,8,22]:Integer, [-1,8,23]:Integer, [-1,8,24]:Integer, [-1,8,25]:Integer, [-1,8,26]:Integer, [-1,8,27]:Integer, [-1,8,28]:Integer, [-1,8,29]:Integer, [-1,8,30]:Integer, [-1,8,31]:Integer, [-1,8,32]:Integer, [-1,8,33]:Integer, [-1,8,34]:Integer, [-1,8,35]:Integer, [-1,8,36]:Integer, [-1,8,37]:Integer, [-1,8,38]:Integer, [-1,8,39]:Integer, [-1,16]:Pointer, [-1,16,0]:Pointer, [-1,16,0,-1]:Integer, [-1,16,8]:Integer, [-1,16,9]:Integer, [-1,16,10]:Integer, [-1,16,11]:Integer, [-1,16,12]:Integer, [-1,16,13]:Integer, [-1,16,14]:Integer, [-1,16,15]:Integer, [-1,16,16]:Integer, [-1,16,17]:Integer, [-1,16,18]:Integer, [-1,16,19]:Integer, [-1,16,20]:Integer, [-1,16,21]:Integer, [-1,16,22]:Integer, [-1,16,23]:Integer, [-1,16,24]:Integer, [-1,16,25]:Integer, [-1,16,26]:Integer, [-1,16,27]:Integer, [-1,16,28]:Integer, [-1,16,29]:Integer, [-1,16,30]:Integer, [-1,16,31]:Integer, [-1,16,32]:Integer, [-1,16,33]:Integer, [-1,16,34]:Integer, [-1,16,35]:Integer, [-1,16,36]:Integer, [-1,16,37]:Integer, [-1,16,38]:Integer, [-1,16,39]:Integer, [-1,24]:Pointer, [-1,24,0]:Pointer, [-1,24,0,-1]:Integer, [-1,24,8]:Integer, [-1,24,9]:Integer, [-1,24,10]:Integer, [-1,24,11]:Integer, [-1,24,12]:Integer, [-1,24,13]:Integer, [-1,24,14]:Integer, [-1,24,15]:Integer, [-1,24,16]:Integer, [-1,24,17]:Integer, [-1,24,18]:Integer, [-1,24,19]:Integer, [-1,24,20]:Integer, [-1,24,21]:Integer, [-1,24,22]:Integer, [-1,24,23]:Integer, [-1,24,24]:Integer, [-1,24,25]:Integer, [-1,24,26]:Integer, [-1,24,27]:Integer, [-1,24,28]:Integer, [-1,24,29]:Integer, [-1,24,30]:Integer, [-1,24,31]:Integer, [-1,24,32]:Integer, [-1,24,33]:Integer, [-1,24,34]:Integer, [-1,24,35]:Integer, [-1,24,36]:Integer, [-1,24,37]:Integer, [-1,24,38]:Integer, [-1,24,39]:Integer, [-1,32]:Pointer, [-1,32,0]:Pointer, [-1,32,0,0]:Integer, [-1,32,0,1]:Integer, [-1,32,0,2]:Integer, [-1,32,0,3]:Integer, [-1,32,0,4]:Integer, [-1,32,0,5]:Integer, [-1,32,0,6]:Integer, [-1,32,0,7]:Integer, [-1,32,0,8]:Integer, [-1,32,0,9]:Integer, [-1,32,0,10]:Integer, [-1,32,0,11]:Integer, [-1,32,0,12]:Integer, [-1,32,0,13]:Integer, [-1,32,0,14]:Integer, [-1,32,0,15]:Integer, [-1,32,0,16]:Float@double, [-1,32,0,24]:Float@double, [-1,32,0,32]:Float@double, [-1,32,0,40]:Float@double, [-1,32,0,48]:Integer, [-1,32,8]:Integer, [-1,32,9]:Integer, [-1,32,10]:Integer, [-1,32,11]:Integer, [-1,32,12]:Integer, [-1,32,13]:Integer, [-1,32,14]:Integer, [-1,32,15]:Integer, [-1,32,16]:Integer, [-1,32,17]:Integer, [-1,32,18]:Integer, [-1,32,19]:Integer, [-1,32,20]:Integer, [-1,32,21]:Integer, [-1,32,22]:Integer, [-1,32,23]:Integer, [-1,32,24]:Integer, [-1,32,25]:Integer, [-1,32,26]:Integer, [-1,32,27]:Integer, [-1,32,28]:Integer, [-1,32,29]:Integer, [-1,32,30]:Integer, [-1,32,31]:Integer, [-1,32,32]:Integer, [-1,32,33]:Integer, [-1,32,34]:Integer, [-1,32,35]:Integer, [-1,32,36]:Integer, [-1,32,37]:Integer, [-1,32,38]:Integer, [-1,32,39]:Integer, [-1,40]:Pointer, [-1,40,0]:Pointer, [-1,40,0,0]:Pointer, [-1,40,8]:Integer, [-1,40,9]:Integer, [-1,40,10]:Integer, [-1,40,11]:Integer, [-1,40,12]:Integer, [-1,40,13]:Integer, [-1,40,14]:Integer, [-1,40,15]:Integer, [-1,40,16]:Integer, [-1,40,17]:Integer, [-1,40,18]:Integer, [-1,40,19]:Integer, [-1,40,20]:Integer, [-1,40,21]:Integer, [-1,40,22]:Integer, [-1,40,23]:Integer, [-1,40,24]:Integer, [-1,40,25]:Integer, [-1,40,26]:Integer, [-1,40,27]:Integer, [-1,40,28]:Integer, [-1,40,29]:Integer, [-1,40,30]:Integer, [-1,40,31]:Integer, [-1,40,32]:Integer, [-1,40,33]:Integer, [-1,40,34]:Integer, [-1,40,35]:Integer, [-1,40,36]:Integer, [-1,40,37]:Integer, [-1,40,38]:Integer, [-1,40,39]:Integer, [-1,48]:Pointer, [-1,48,0]:Pointer, [-1,48,0,-1]:Integer, [-1,48,8]:Integer, [-1,48,9]:Integer, [-1,48,10]:Integer, [-1,48,11]:Integer, [-1,48,12]:Integer, [-1,48,13]:Integer, [-1,48,14]:Integer, [-1,48,15]:Integer, [-1,48,16]:Integer, [-1,48,17]:Integer, [-1,48,18]:Integer, [-1,48,19]:Integer, [-1,48,20]:Integer, [-1,48,21]:Integer, [-1,48,22]:Integer, [-1,48,23]:Integer, [-1,48,24]:Integer, [-1,48,25]:Integer, [-1,48,26]:Integer, [-1,48,27]:Integer, [-1,48,28]:Integer, [-1,48,29]:Integer, [-1,48,30]:Integer, [-1,48,31]:Integer, [-1,48,32]:Integer, [-1,48,33]:Integer, [-1,48,34]:Integer, [-1,48,35]:Integer, [-1,48,36]:Integer, [-1,48,37]:Integer, [-1,48,38]:Integer, [-1,48,39]:Integer, [-1,56]:Pointer, [-1,56,0]:Pointer, [-1,56,0,-1]:Integer, [-1,56,8]:Integer, [-1,56,9]:Integer, [-1,56,10]:Integer, [-1,56,11]:Integer, [-1,56,12]:Integer, [-1,56,13]:Integer, [-1,56,14]:Integer, [-1,56,15]:Integer, [-1,56,16]:Integer, [-1,56,17]:Integer, [-1,56,18]:Integer, [-1,56,19]:Integer, [-1,56,20]:Integer, [-1,56,21]:Integer, [-1,56,22]:Integer, [-1,56,23]:Integer, [-1,56,24]:Integer, [-1,56,25]:Integer, [-1,56,26]:Integer, [-1,56,27]:Integer, [-1,56,28]:Integer, [-1,56,29]:Integer, [-1,56,30]:Integer, [-1,56,31]:Integer, [-1,56,32]:Integer, [-1,56,33]:Integer, [-1,56,34]:Integer, [-1,56,35]:Integer, [-1,56,36]:Integer, [-1,56,37]:Integer, [-1,56,38]:Integer, [-1,56,39]:Integer, [-1,64]:Pointer, [-1,64,0]:Pointer, [-1,64,0,-1]:Integer, [-1,64,8]:Integer, [-1,64,9]:Integer, [-1,64,10]:Integer, [-1,64,11]:Integer, [-1,64,12]:Integer, [-1,64,13]:Integer, [-1,64,14]:Integer, [-1,64,15]:Integer, [-1,64,16]:Integer, [-1,64,17]:Integer, [-1,64,18]:Integer, [-1,64,19]:Integer, [-1,64,20]:Integer, [-1,64,21]:Integer, [-1,64,22]:Integer, [-1,64,23]:Integer, [-1,64,24]:Integer, [-1,64,25]:Integer, [-1,64,26]:Integer, [-1,64,27]:Integer, [-1,64,28]:Integer, [-1,64,29]:Integer, [-1,64,30]:Integer, [-1,64,31]:Integer, [-1,64,32]:Integer, [-1,64,33]:Integer, [-1,64,34]:Integer, [-1,64,35]:Integer, [-1,64,36]:Integer, [-1,64,37]:Integer, [-1,64,38]:Integer, [-1,64,39]:Integer, [-1,72]:Pointer, [-1,72,0]:Pointer, [-1,72,0,-1]:Integer, [-1,72,8]:Integer, [-1,72,9]:Integer, [-1,72,10]:Integer, [-1,72,11]:Integer, [-1,72,12]:Integer, [-1,72,13]:Integer, [-1,72,14]:Integer, [-1,72,15]:Integer, [-1,72,16]:Integer, [-1,72,17]:Integer, [-1,72,18]:Integer, [-1,72,19]:Integer, [-1,72,20]:Integer, [-1,72,21]:Integer, [-1,72,22]:Integer, [-1,72,23]:Integer, [-1,72,24]:Integer, [-1,72,25]:Integer, [-1,72,26]:Integer, [-1,72,27]:Integer, [-1,72,28]:Integer, [-1,72,29]:Integer, [-1,72,30]:Integer, [-1,72,31]:Integer, [-1,72,32]:Integer, [-1,72,33]:Integer, [-1,72,34]:Integer, [-1,72,35]:Integer, [-1,72,36]:Integer, [-1,72,37]:Integer, [-1,72,38]:Integer, [-1,72,39]:Integer, [-1,80]:Pointer, [-1,80,0]:Pointer, [-1,80,0,0]:Integer, [-1,80,0,1]:Integer, [-1,80,0,2]:Integer, [-1,80,0,3]:Integer, [-1,80,0,4]:Integer, [-1,80,0,5]:Integer, [-1,80,0,6]:Integer, [-1,80,0,7]:Integer, [-1,80,0,8]:Integer, [-1,80,0,9]:Integer, [-1,80,0,10]:Integer, [-1,80,0,11]:Integer, [-1,80,0,12]:Integer, [-1,80,0,13]:Integer, [-1,80,0,14]:Integer, [-1,80,0,15]:Integer, [-1,80,0,16]:Float@double, [-1,80,0,24]:Float@double, [-1,80,0,32]:Float@double, [-1,80,0,40]:Float@double, [-1,80,0,48]:Integer, [-1,80,8]:Integer, [-1,80,9]:Integer, [-1,80,10]:Integer, [-1,80,11]:Integer, [-1,80,12]:Integer, [-1,80,13]:Integer, [-1,80,14]:Integer, [-1,80,15]:Integer, [-1,80,16]:Integer, [-1,80,17]:Integer, [-1,80,18]:Integer, [-1,80,19]:Integer, [-1,80,20]:Integer, [-1,80,21]:Integer, [-1,80,22]:Integer, [-1,80,23]:Integer, [-1,80,24]:Integer, [-1,80,25]:Integer, [-1,80,26]:Integer, [-1,80,27]:Integer, [-1,80,28]:Integer, [-1,80,29]:Integer, [-1,80,30]:Integer, [-1,80,31]:Integer, [-1,80,32]:Integer, [-1,80,33]:Integer, [-1,80,34]:Integer, [-1,80,35]:Integer, [-1,80,36]:Integer, [-1,80,37]:Integer, [-1,80,38]:Integer, [-1,80,39]:Integer, [-1,88]:Pointer, [-1,88,0]:Pointer, [-1,88,0,0]:Pointer, [-1,88,8]:Integer, [-1,88,9]:Integer, [-1,88,10]:Integer, [-1,88,11]:Integer, [-1,88,12]:Integer, [-1,88,13]:Integer, [-1,88,14]:Integer, [-1,88,15]:Integer, [-1,88,16]:Integer, [-1,88,17]:Integer, [-1,88,18]:Integer, [-1,88,19]:Integer, [-1,88,20]:Integer, [-1,88,21]:Integer, [-1,88,22]:Integer, [-1,88,23]:Integer, [-1,88,24]:Integer, [-1,88,25]:Integer, [-1,88,26]:Integer, [-1,88,27]:Integer, [-1,88,28]:Integer, [-1,88,29]:Integer, [-1,88,30]:Integer, [-1,88,31]:Integer, [-1,88,32]:Integer, [-1,88,33]:Integer, [-1,88,34]:Integer, [-1,88,35]:Integer, [-1,88,36]:Integer, [-1,88,37]:Integer, [-1,88,38]:Integer, [-1,88,39]:Integer}" "enzymejl_parmtype"="140582344938640" "enzymejl_parmtype_ref"="1" %"'2", { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg) unnamed_addr #25 !dbg !1754 {

[...]

invertidxend105_amerge_amerge_active:             ; preds = %invertidxend105_amerge_amerge
  %732 = load double, double addrspace(13)* %"arrayref95.sroa.3.0..sroa_idx129'ipg_unwrap", align 8, !dbg !1821, !tbaa !376, !alias.scope !1942, !noalias !1927
  %733 = fadd fast double %732, %728, !dbg !1821
  store double %733, double addrspace(13)* %"arrayref95.sroa.3.0..sroa_idx129'ipg_unwrap", align 8, !dbg !1821, !tbaa !376, !alias.scope !1942, !noalias !1927
  br label %invertidxend105_amerge_amerge_amerge, !dbg !1821

invertidxend105_amerge_amerge_amerge:             ; preds = %invertidxend105_amerge_amerge_active, %invertidxend105_amerge_amerge
  br label %invertidxend79

invertpass:                                       ; preds = %invertguard_pass122, %invertL94
  br label %invertL83

invertguard_pass122:                              ; preds = %invertL94
  br label %invertpass

remat_enter:                                      ; preds = %mergeinvertL28_L83.loopexit, %incinvertL28
  br label %remat_L28_L28

remat_L28_L28:                                    ; preds = %remat_enter
  br label %remat_L28_idxend

remat_L28_idxend:                                 ; preds = %remat_L28_L28
  br label %remat_L28_idxend16

remat_L28_idxend16:                               ; preds = %remat_L28_idxend
  br label %remat_L28_idxend25

remat_L28_idxend25:                               ; preds = %remat_L28_idxend16
  br label %remat_L28_idxend34

remat_L28_idxend34:                               ; preds = %remat_L28_idxend25
  br label %remat_L28_idxend43

remat_L28_idxend43:                               ; preds = %remat_L28_idxend34
  br label %remat_L28_idxend52

remat_L28_idxend52:                               ; preds = %remat_L28_idxend43
  %734 = load i64, i64* %"iv13'ac", align 8
  %735 = load i64, i64* %"iv'ac", align 8
  %_unwrap = bitcast i8* %56 to [1 x [3 x double]]*
  %.fca.0.0.gep8_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap, i32 0, i32 0, i32 0
  %736 = load i64, i64* %"iv13'ac", align 8
  %737 = load i64, i64* %"iv'ac", align 8
  %738 = load i64, i64* %"iv'ac", align 8
  %_unwrap300 = load i64*, i64** %mdyncache_fromtape_cache267, align 8, !dbg !1759, !dereferenceable !1112, !invariant.group !1763
  %_unwrap301 = getelementptr inbounds i64, i64* %_unwrap300, i64 %738
  %arraylen_unwrap302 = load i64, i64* %_unwrap301, align 8, !dbg !1759, !alias.scope !1879, !noalias !1882, !invariant.group !1764
  %_unwrap34 = add nsw i64 %arraylen_unwrap302, -1
  %739 = add nuw i64 %_unwrap34, 1
  %740 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 14
  %741 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %740, i64 %737
  %742 = load [1 x [3 x double]]*, [1 x [3 x double]]** %741, align 8, !dereferenceable !1112, !invariant.group !1947
  %743 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %742, i64 %736
  %744 = load [1 x [3 x double]], [1 x [3 x double]]* %743, align 8, !dbg !1789, !invariant.group !1948
  %.fca.0.0.extract7_unwrap = extractvalue [1 x [3 x double]] %744, 0, 0
  store double %.fca.0.0.extract7_unwrap, double* %.fca.0.0.gep8_unwrap, align 8, !dbg !1789
  %745 = load i64, i64* %"iv13'ac", align 8
  %746 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.gep10_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap, i32 0, i32 0, i32 1
  %747 = load i64, i64* %"iv13'ac", align 8
  %748 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.extract9_unwrap = extractvalue [1 x [3 x double]] %744, 0, 1
  store double %.fca.0.1.extract9_unwrap, double* %.fca.0.1.gep10_unwrap, align 8, !dbg !1789
  %749 = load i64, i64* %"iv13'ac", align 8
  %750 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.gep12_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap, i32 0, i32 0, i32 2
  %751 = load i64, i64* %"iv13'ac", align 8
  %752 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.extract11_unwrap = extractvalue [1 x [3 x double]] %744, 0, 2
  store double %.fca.0.2.extract11_unwrap, double* %.fca.0.2.gep12_unwrap, align 8, !dbg !1789
  br label %remat_L28_idxend61

remat_L28_idxend61:                               ; preds = %remat_L28_idxend52
  %753 = load i64, i64* %"iv13'ac", align 8
  %754 = load i64, i64* %"iv'ac", align 8
  %_unwrap35 = bitcast i8* %57 to [1 x [3 x double]]*
  %.fca.0.0.gep2_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap35, i32 0, i32 0, i32 0
  %755 = load i64, i64* %"iv13'ac", align 8
  %756 = load i64, i64* %"iv'ac", align 8
  %757 = load i64, i64* %"iv'ac", align 8
  %_unwrap303 = load i64*, i64** %mdyncache_fromtape_cache267, align 8, !dbg !1759, !dereferenceable !1112, !invariant.group !1763
  %_unwrap304 = getelementptr inbounds i64, i64* %_unwrap303, i64 %757
  %arraylen_unwrap305 = load i64, i64* %_unwrap304, align 8, !dbg !1759, !alias.scope !1879, !noalias !1882, !invariant.group !1764
  %_unwrap44 = add nsw i64 %arraylen_unwrap305, -1
  %758 = add nuw i64 %_unwrap44, 1
  %759 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 16
  %760 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %759, i64 %756
  %761 = load [1 x [3 x double]]*, [1 x [3 x double]]** %760, align 8, !dereferenceable !1112, !invariant.group !1949
  %762 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %761, i64 %755
  %763 = load [1 x [3 x double]], [1 x [3 x double]]* %762, align 8, !dbg !1789, !invariant.group !1950
  %.fca.0.0.extract1_unwrap = extractvalue [1 x [3 x double]] %763, 0, 0
  store double %.fca.0.0.extract1_unwrap, double* %.fca.0.0.gep2_unwrap, align 8, !dbg !1789
  %764 = load i64, i64* %"iv13'ac", align 8
  %765 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.gep4_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap35, i32 0, i32 0, i32 1
  %766 = load i64, i64* %"iv13'ac", align 8
  %767 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.extract3_unwrap = extractvalue [1 x [3 x double]] %763, 0, 1
  store double %.fca.0.1.extract3_unwrap, double* %.fca.0.1.gep4_unwrap, align 8, !dbg !1789
  %768 = load i64, i64* %"iv13'ac", align 8
  %769 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.gep6_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap35, i32 0, i32 0, i32 2
  %770 = load i64, i64* %"iv13'ac", align 8
  %771 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.extract5_unwrap = extractvalue [1 x [3 x double]] %763, 0, 2
  store double %.fca.0.2.extract5_unwrap, double* %.fca.0.2.gep6_unwrap, align 8, !dbg !1789
  br label %remat_L28_idxend70

remat_L28_idxend70:                               ; preds = %remat_L28_idxend61
  %772 = load i64, i64* %"iv13'ac", align 8
  %773 = load i64, i64* %"iv'ac", align 8
  %_unwrap45 = bitcast i8* %58 to [1 x [3 x double]]*
  %.fca.0.0.gep_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap45, i32 0, i32 0, i32 0
  %774 = load i64, i64* %"iv13'ac", align 8
  %775 = load i64, i64* %"iv'ac", align 8
  %776 = load i64, i64* %"iv'ac", align 8
  %_unwrap297 = load i64*, i64** %mdyncache_fromtape_cache267, align 8, !dbg !1759, !dereferenceable !1112, !invariant.group !1763
  %_unwrap298 = getelementptr inbounds i64, i64* %_unwrap297, i64 %776
  %arraylen_unwrap299 = load i64, i64* %_unwrap298, align 8, !dbg !1759, !alias.scope !1879, !noalias !1882, !invariant.group !1764
  %_unwrap54 = add nsw i64 %arraylen_unwrap299, -1
  %777 = add nuw i64 %_unwrap54, 1
  %778 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 18
  %779 = getelementptr inbounds [1 x [3 x double]]*, [1 x [3 x double]]** %778, i64 %775
  %780 = load [1 x [3 x double]]*, [1 x [3 x double]]** %779, align 8, !dereferenceable !1112, !invariant.group !1951
  %781 = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %780, i64 %774
  %782 = load [1 x [3 x double]], [1 x [3 x double]]* %781, align 8, !dbg !1789, !invariant.group !1952
  %.fca.0.0.extract_unwrap = extractvalue [1 x [3 x double]] %782, 0, 0
  store double %.fca.0.0.extract_unwrap, double* %.fca.0.0.gep_unwrap, align 8, !dbg !1789
  %783 = load i64, i64* %"iv13'ac", align 8
  %784 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.gep_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap45, i32 0, i32 0, i32 1
  %785 = load i64, i64* %"iv13'ac", align 8
  %786 = load i64, i64* %"iv'ac", align 8
  %.fca.0.1.extract_unwrap = extractvalue [1 x [3 x double]] %782, 0, 1
  store double %.fca.0.1.extract_unwrap, double* %.fca.0.1.gep_unwrap, align 8, !dbg !1789
  %787 = load i64, i64* %"iv13'ac", align 8
  %788 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.gep_unwrap = getelementptr inbounds [1 x [3 x double]], [1 x [3 x double]]* %_unwrap45, i32 0, i32 0, i32 2
  %789 = load i64, i64* %"iv13'ac", align 8
  %790 = load i64, i64* %"iv'ac", align 8
  %.fca.0.2.extract_unwrap = extractvalue [1 x [3 x double]] %782, 0, 2
  store double %.fca.0.2.extract_unwrap, double* %.fca.0.2.gep_unwrap, align 8, !dbg !1789
  br label %remat_L28_idxend79

remat_L28_idxend79:                               ; preds = %remat_L28_idxend70
  br label %remat_L28_idxend105

remat_L28_idxend105:                              ; preds = %remat_L28_idxend79
  %791 = load i64, i64* %"iv13'ac", align 8
  %792 = load i64, i64* %"iv'ac", align 8
  %iv.next14_unwrap = add nuw nsw i64 %791, 1
  %793 = extractvalue { {} addrspace(10)*, i8*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)* addrspace(10)*, {} addrspace(10)*, {} addrspace(10)*, [6 x {} addrspace(10)*], i64*, double**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, i64**, [1 x [3 x double]]**, double**, double**, double**, double**, [6 x {} addrspace(10)*] addrspace(10)* } %tapeArg, 11
  %794 = getelementptr inbounds i64, i64* %793, i64 %792
  %795 = load i64, i64* %794, align 8, !dbg !1758, !tbaa !80, !range !83, !alias.scope !1879, !noalias !1882, !invariant.group !1884
  %.not158_unwrap = icmp eq i64 %iv.next14_unwrap, %795
  br i1 %.not158_unwrap, label %invertidxend105, label %invertidxend105
}

LLVM.LoadInst(%unbox117.unpack141 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox117.elt140, align 8, !enzyme_inactive !0, !enzyme_type !26, !enzymejl_byref_MUT_REF !0, !enzymejl_source_type_Vector\7BInt64\7D !0)
LLVM.PHIInst(%unbox117.unpack141_replacementA = phi {} addrspace(10)* )


Stacktrace:
 [1] specific_forces!
   @ ~/dms/molly_dev/enzyme_err41.jl:46

Stacktrace:
  [1] julia_error(cstr::Cstring, val::Ptr{LLVM.API.LLVMOpaqueValue}, errtype::Enzyme.API.ErrorType, data::Ptr{Nothing}, data2::Ptr{LLVM.API.LLVMOpaqueValue}, B::Ptr{LLVM.API.LLVMOpaqueBuilder})
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:1641
  [2] EnzymeCreatePrimalAndGradient(logic::Enzyme.Logic, todiff::LLVM.Function, retType::Enzyme.API.CDIFFE_TYPE, constant_args::Vector{Enzyme.API.CDIFFE_TYPE}, TA::Enzyme.TypeAnalysis, returnValue::Bool, dretUsed::Bool, mode::Enzyme.API.CDerivativeMode, runtimeActivity::Bool, width::Int64, additionalArg::Ptr{Nothing}, forceAnonymousTape::Bool, typeInfo::Enzyme.FnTypeInfo, uncacheable_args::Vector{Bool}, augmented::Ptr{Nothing}, atomicAdd::Bool)
    @ Enzyme.API ~/.julia/dev/Enzyme/src/api.jl:253
  [3] enzyme!(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, mod::LLVM.Module, primalf::LLVM.Function, TT::Type, mode::Enzyme.API.CDerivativeMode, width::Int64, parallel::Bool, actualRetType::Type, wrap::Bool, modifiedBetween::NTuple{4, Bool}, returnPrimal::Bool, expectedTapeType::Type, loweredArgs::Set{Int64}, boxedArgs::Set{Int64})
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:4186
  [4] codegen(output::Symbol, job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, toplevel::Bool, strip::Bool, validate::Bool, only_entry::Bool, parent_job::Nothing)
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:7338
  [5] codegen
    @ ~/.julia/dev/Enzyme/src/compiler.jl:6146 [inlined]
  [6] _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool)
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:8468
  [7] _thunk
    @ ~/.julia/dev/Enzyme/src/compiler.jl:8468 [inlined]
  [8] cached_compilation
    @ ~/.julia/dev/Enzyme/src/compiler.jl:8509 [inlined]
  [9] thunkbase(ctx::LLVM.Context, mi::Core.MethodInstance, ::Val{0x0000000000007b18}, ::Type{Const{typeof(test_forces_grad)}}, ::Type{Active}, tt::Type{Tuple{Duplicated{Dict{String, Float64}}, Const{Tuple{InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64, Float64}}}, InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64, Float64}}}}}, Duplicated{Vector{SVector{3, Float64}}}}}, ::Val{Enzyme.API.DEM_ReverseModeCombined}, ::Val{1}, ::Val{(false, false, false, false)}, ::Val{false}, ::Val{false}, ::Type{FFIABI}, ::Val{true}, ::Val{true})
    @ Enzyme.Compiler ~/.julia/dev/Enzyme/src/compiler.jl:8641
 [10] #s2103#19072
    @ ~/.julia/dev/Enzyme/src/compiler.jl:8778 [inlined]
 [11] var"#s2103#19072"(FA::Any, A::Any, TT::Any, Mode::Any, ModifiedBetween::Any, width::Any, ReturnPrimal::Any, ShadowInit::Any, World::Any, ABI::Any, ErrIfFuncWritten::Any, RuntimeActivity::Any, ::Any, ::Type, ::Type, ::Type, tt::Any, ::Type, ::Type, ::Type, ::Type, ::Type, ::Type, ::Type, ::Any)
    @ Enzyme.Compiler ./none:0
 [12] (::Core.GeneratedFunctionStub)(::UInt64, ::LineNumberNode, ::Any, ::Vararg{Any})
    @ Core ./boot.jl:602
 [13] autodiff
    @ ~/.julia/dev/Enzyme/src/Enzyme.jl:473 [inlined]
 [14] autodiff(::ReverseMode{false, true, FFIABI, false, false}, ::typeof(test_forces_grad), ::Type{Active}, ::Duplicated{Dict{String, Float64}}, ::Const{Tuple{InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64, Float64}}}, InteractionList4Atoms{Vector{Int64}, Vector{PeriodicTorsion{2, Float64, Float64}}}}}, ::Duplicated{Vector{SVector{3, Float64}}})
    @ Enzyme ~/.julia/dev/Enzyme/src/Enzyme.jl:512
 [15] top-level scope
    @ ~/dms/molly_dev/enzyme_err41.jl:90
@wsmoses
Copy link
Member

wsmoses commented Nov 27, 2024

Can you paste the whole log

@wsmoses
Copy link
Member

wsmoses commented Nov 27, 2024

ah you did!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants