Skip to content

Enzyme compilation fails for vcat with Julia 1.11 #2236

@gdalle

Description

@gdalle

This was detected in DI's test suite, which Enzyme 0.13.25 broke on Julia 1.11 (but not on 1.10).

CI log: https://github.com/JuliaDiff/DifferentiationInterface.jl/actions/runs/12492983197/job/34860909543

MWE:

julia> using DifferentiationInterface

julia> import Enzyme

julia> f(x) = vcat(vec(x), vec(x))
f (generic function with 1 method)

julia> x, dx = ones(2, 3), ones(2, 3);

julia> pushforward(f, AutoEnzyme(), x, (dx,))
ERROR: Enzyme compilation failed due to an internal error.
 Please open an issue with the code to reproduce and full error log on github.com/EnzymeAD/Enzyme.jl
 To toggle more information for debugging (needed for bug reports), set Enzyme.Compiler.VERBOSE_ERRORS[] = true (default false)

Illegal replace ficticious phi for:   %_replacementA = phi {} addrspace(10)* , !dbg !100 of   %26 = call noalias nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 24, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4947034288 to {}*) to {} addrspace(10)*)) #20, !dbg !73

Stacktrace:
 [1] Array
   @ ./boot.jl:579
 [2] vcat
   @ ./array.jl:2228

Stacktrace:
  [1] julia_error(msg::String, val::Ptr{…}, errtype::Enzyme.API.ErrorType, data::Ptr{…}, data2::Ptr{…}, B::Ptr{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/errors.jl:384
  [2] julia_error(cstr::Cstring, val::Ptr{…}, errtype::Enzyme.API.ErrorType, data::Ptr{…}, data2::Ptr{…}, B::Ptr{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/errors.jl:210
  [3] EnzymeCreateForwardDiff(logic::Enzyme.Logic, todiff::LLVM.Function, retType::Enzyme.API.CDIFFE_TYPE, constant_args::Vector{…}, TA::Enzyme.TypeAnalysis, returnValue::Bool, mode::Enzyme.API.CDerivativeMode, runtimeActivity::Bool, width::Int64, additionalArg::Ptr{…}, typeInfo::Enzyme.FnTypeInfo, uncacheable_args::Vector{…})
    @ Enzyme.API ~/.julia/packages/Enzyme/DL6fx/src/api.jl:334
  [4] enzyme!(job::GPUCompiler.CompilerJob{…}, mod::LLVM.Module, primalf::LLVM.Function, TT::Type, mode::Enzyme.API.CDerivativeMode, width::Int64, parallel::Bool, actualRetType::Type, wrap::Bool, modifiedBetween::NTuple{…} where N, returnPrimal::Bool, expectedTapeType::Type, loweredArgs::Set{…}, boxedArgs::Set{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:1729
  [5] codegen(output::Symbol, job::GPUCompiler.CompilerJob{…}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, toplevel::Bool, strip::Bool, validate::Bool, only_entry::Bool, parent_job::Nothing)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:4534
  [6] codegen
    @ ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:3337 [inlined]
  [7] _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5386
  [8] _thunk
    @ ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5386 [inlined]
  [9] cached_compilation
    @ ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5438 [inlined]
 [10] thunkbase(mi::Core.MethodInstance, World::UInt64, FA::Type{…}, A::Type{…}, TT::Type, Mode::Enzyme.API.CDerivativeMode, width::Int64, ModifiedBetween::NTuple{…} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, edges::Vector{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5549
 [11] thunk_generator(world::UInt64, source::LineNumberNode, FA::Type, A::Type, TT::Type, Mode::Enzyme.API.CDerivativeMode, Width::Int64, ModifiedBetween::NTuple{…} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, self::Any, fakeworld::Any, fa::Type, a::Type, tt::Type, mode::Type, width::Type, modifiedbetween::Type, returnprimal::Type, shadowinit::Type, abi::Type, erriffuncwritten::Type, runtimeactivity::Type)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5734
 [12] autodiff
    @ ~/.julia/packages/Enzyme/DL6fx/src/Enzyme.jl:640 [inlined]
 [13] autodiff
    @ ~/.julia/packages/Enzyme/DL6fx/src/Enzyme.jl:544 [inlined]
 [14] autodiff
    @ ~/.julia/packages/Enzyme/DL6fx/src/Enzyme.jl:516 [inlined]
 [15] pushforward(::typeof(f), ::DifferentiationInterface.NoPushforwardPrep, ::AutoEnzyme{…}, ::Matrix{…}, ::Tuple{…})
    @ DifferentiationInterfaceEnzymeExt ~/.julia/packages/DifferentiationInterface/6QHLL/ext/DifferentiationInterfaceEnzymeExt/forward_onearg.jl:60
 [16] pushforward(::typeof(f), ::AutoEnzyme{Nothing, Nothing}, ::Matrix{Float64}, ::Tuple{Matrix{Float64}})
    @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/6QHLL/src/fallbacks/no_prep.jl:128
 [17] top-level scope
    @ ~/Downloads/Untitled-1.jl:6
Some type information was truncated. Use `show(err)` to see complete types.

Illegal replace ficticious phi for:   %_replacementA = phi {} addrspace(10)* , !dbg !100 of   %26 = call noalias nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 24, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4947034288 to {}*) to {} addrspace(10)*)) #20, !dbg !73

Versions:

julia> versioninfo()
Julia Version 1.11.2
Commit 5e9a32e7af2 (2024-12-01 20:02 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (x86_64-apple-darwin24.0.0)
  CPU: 4 × Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
Threads: 4 default, 0 interactive, 2 GC (on 4 virtual cores)
Environment:
  JULIA_EDITOR = code

(@di) pkg> st
Status `~/.julia/environments/di/Project.toml`
  [a0c0ee7d] DifferentiationInterface v0.6.28
  [a82114a7] DifferentiationInterfaceTest v0.9.1
  [7da242da] Enzyme v0.13.25

Full error report:

Details
julia> Enzyme.Compiler.VERBOSE_ERRORS[] = true
true

julia> pushforward(f, AutoEnzyme(), x, (dx,))
ERROR: Enzyme compilation failed due to an internal error.
 Please open an issue with the code to reproduce and full error log on github.com/EnzymeAD/Enzyme.jl
 To toggle more information for debugging (needed for bug reports), set Enzyme.Compiler.VERBOSE_ERRORS[] = true (default false)
Current scope: 
; Function Attrs: mustprogress willreturn
define internal fastcc noalias nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" {} addrspace(10)* @preprocess_julia_vcat_24743({} addrspace(10)* noundef nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" "enzymejl_parmtype"="4947034288" "enzymejl_parmtype_ref"="2" %0, {} addrspace(10)* noundef nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" "enzymejl_parmtype"="4947034288" "enzymejl_parmtype_ref"="2" %1) unnamed_addr #16 !dbg !207 {
top:
  %arrays = alloca [2 x {} addrspace(10)*], align 8
  %pgcstack = call {}*** @julia.get_pgcstack() #17
  %.fca.0.gep = getelementptr inbounds [2 x {} addrspace(10)*], [2 x {} addrspace(10)*]* %arrays, i64 0, i64 0
  %.fca.1.gep = getelementptr inbounds [2 x {} addrspace(10)*], [2 x {} addrspace(10)*]* %arrays, i64 0, i64 1
  store {} addrspace(10)* %0, {} addrspace(10)** %.fca.0.gep, align 8, !tbaa !55, !alias.scope !57, !noalias !208
  store {} addrspace(10)* %1, {} addrspace(10)** %.fca.1.gep, align 8, !tbaa !55, !alias.scope !57, !noalias !208
  %current_task134 = getelementptr inbounds {}**, {}*** %pgcstack, i64 -14
  %ptls_field35 = getelementptr inbounds {}**, {}*** %pgcstack, i64 2
  %2 = bitcast {}*** %ptls_field35 to i64***
  %ptls_load3637 = load i64**, i64*** %2, align 8, !tbaa !10
  %3 = getelementptr inbounds i64*, i64** %ptls_load3637, i64 2
  %safepoint = load i64*, i64** %3, align 8, !tbaa !14
  fence syncscope("singlethread") seq_cst
  call void @julia.safepoint(i64* %safepoint) #18, !dbg !211
  fence syncscope("singlethread") seq_cst
  %4 = load atomic {} addrspace(10)*, {} addrspace(10)** %.fca.0.gep unordered, align 8, !dbg !212, !tbaa !55, !alias.scope !57, !noalias !67, !nonnull !0, !dereferenceable !68, !align !69, !enzyme_type !70
  %5 = bitcast {} addrspace(10)* %4 to i8 addrspace(10)*, !dbg !216
  %6 = addrspacecast i8 addrspace(10)* %5 to i8 addrspace(11)*, !dbg !216
  %7 = getelementptr inbounds i8, i8 addrspace(11)* %6, i64 16, !dbg !216
  %8 = bitcast i8 addrspace(11)* %7 to i64 addrspace(11)*, !dbg !216
  %9 = load i64, i64 addrspace(11)* %8, align 8, !dbg !216, !tbaa !51, !alias.scope !26, !noalias !29
  %10 = bitcast {} addrspace(10)** %.fca.1.gep to i8 addrspace(10)**, !dbg !218
  %11 = load atomic i8 addrspace(10)*, i8 addrspace(10)** %10 unordered, align 8, !dbg !218, !tbaa !55, !alias.scope !57, !noalias !67, !nonnull !0, !dereferenceable !68, !align !69
  %12 = getelementptr inbounds i8, i8 addrspace(10)* %11, i64 16, !dbg !216
  %13 = bitcast i8 addrspace(10)* %12 to i64 addrspace(10)*, !dbg !216
  %14 = addrspacecast i64 addrspace(10)* %13 to i64 addrspace(11)*, !dbg !216
  %15 = load i64, i64 addrspace(11)* %14, align 8, !dbg !216, !tbaa !51, !alias.scope !26, !noalias !29
  %16 = add i64 %15, %9, !dbg !221
  %17 = bitcast {}*** %current_task134 to {}*
  %.not = icmp eq i64 %16, 0, !dbg !222
  br i1 %.not, label %L34, label %L36, !dbg !222

L34:                                              ; preds = %top
  %18 = load atomic {} addrspace(10)*, {} addrspace(10)** inttoptr (i64 4977410000 to {} addrspace(10)**) unordered, align 16, !dbg !225, !tbaa !14, !alias.scope !88, !noalias !89, !nonnull !0, !enzyme_type !37, !enzymejl_source_type_Memory\7BFloat64\7D !0, !enzymejl_byref_BITS_REF !0
  %.not38 = icmp eq {} addrspace(10)* %18, null, !dbg !225
  br i1 %.not38, label %fail8, label %L38, !dbg !225

L36:                                              ; preds = %top
  %19 = call noalias "enzyme_type"="{[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,-1]:Float@double}" {} addrspace(10)* @jl_alloc_genericmemory({} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4977409968 to {}*) to {} addrspace(10)*), i64 %16) #19, !dbg !226
  br label %L38, !dbg !219

L38:                                              ; preds = %L36, %L34
  %20 = phi {} addrspace(10)* [ %19, %L36 ], [ %18, %L34 ]
  %21 = bitcast {} addrspace(10)* %20 to { i64, {} addrspace(10)** } addrspace(10)*, !dbg !227
  %22 = addrspacecast { i64, {} addrspace(10)** } addrspace(10)* %21 to { i64, {} addrspace(10)** } addrspace(11)*, !dbg !227
  %23 = getelementptr inbounds { i64, {} addrspace(10)** }, { i64, {} addrspace(10)** } addrspace(11)* %22, i64 0, i32 1, !dbg !227
  %24 = bitcast {} addrspace(10)** addrspace(11)* %23 to i8* addrspace(11)*, !dbg !227
  %25 = load i8*, i8* addrspace(11)* %24, align 8, !dbg !227, !tbaa !14, !alias.scope !88, !noalias !89, !nonnull !0, !enzyme_type !34, !enzymejl_source_type_Ptr\7BFloat64\7D !0, !enzymejl_byref_BITS_VALUE !0
  %26 = call noalias nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 24, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4947034288 to {}*) to {} addrspace(10)*)) #20, !dbg !228
  %27 = bitcast {} addrspace(10)* %26 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !228
  %28 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %27 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !228
  %.repack = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %28, i64 0, i32 0, !dbg !228
  store i8* %25, i8* addrspace(11)* %.repack, align 8, !dbg !228, !tbaa !23, !alias.scope !26, !noalias !229
  %.repack39 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %28, i64 0, i32 1, !dbg !228
  store {} addrspace(10)* %20, {} addrspace(10)* addrspace(11)* %.repack39, align 8, !dbg !228, !tbaa !23, !alias.scope !26, !noalias !229
  %29 = bitcast {} addrspace(10)* %26 to i8 addrspace(10)*, !dbg !228
  %30 = addrspacecast i8 addrspace(10)* %29 to i8 addrspace(11)*, !dbg !228
  %31 = getelementptr inbounds i8, i8 addrspace(11)* %30, i64 16, !dbg !228
  %32 = bitcast i8 addrspace(11)* %31 to i64 addrspace(11)*, !dbg !228
  store i64 %16, i64 addrspace(11)* %32, align 8, !dbg !228, !tbaa !51, !alias.scope !26, !noalias !229
  %33 = add i64 %9, 1, !dbg !230
  %34 = add i64 %16, 1, !dbg !230
  %.not4172 = icmp sgt i64 %33, %34, !dbg !232
  br i1 %.not4172, label %L114, label %L62.lr.ph, !dbg !231

L62.lr.ph:                                        ; preds = %L38
  %35 = bitcast {} addrspace(10)* %20 to i64 addrspace(10)*
  %36 = addrspacecast i64 addrspace(10)* %35 to i64 addrspace(11)*
  %37 = bitcast i8* %25 to double*
  br label %L62, !dbg !231

L62:                                              ; preds = %L108, %L62.lr.ph
  %iv = phi i64 [ %iv.next, %L108 ], [ 0, %L62.lr.ph ]
  %38 = phi i64 [ %33, %L62.lr.ph ], [ %67, %L108 ]
  %39 = phi i64 [ %9, %L62.lr.ph ], [ %66, %L108 ]
  %value_phi1475 = phi i64 [ 1, %L62.lr.ph ], [ %38, %L108 ]
  %value_phi1273 = phi {} addrspace(10)* [ %4, %L62.lr.ph ], [ %60, %L108 ]
  %40 = add nuw nsw i64 %iv, 2, !dbg !233
  %iv.next = add nuw nsw i64 %iv, 1, !dbg !233
  %.not42 = icmp eq i64 %39, 0, !dbg !233
  br i1 %.not42, label %L95, label %L66, !dbg !234

L66:                                              ; preds = %L62
  %41 = add i64 %value_phi1475, -1, !dbg !236
  %42 = load i64, i64 addrspace(11)* %36, align 8, !dbg !236, !tbaa !43, !range !106, !alias.scope !26, !noalias !29, !enzyme_type !45, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0, !enzyme_inactive !0
  %43 = add i64 %42, %41, !dbg !236
  %44 = shl nuw nsw i64 %42, 1, !dbg !236
  %.not43 = icmp ult i64 %43, %44, !dbg !236
  %45 = getelementptr inbounds double, double* %37, i64 %41, !dbg !236
  %46 = bitcast double* %45 to i8*, !dbg !236
  %47 = load i8*, i8* addrspace(11)* %24, align 8, !dbg !236, !tbaa !14, !alias.scope !88, !noalias !89, !nonnull !0, !enzyme_type !34, !enzymejl_source_type_Ptr\7BFloat64\7D !0, !enzymejl_byref_BITS_VALUE !0
  %48 = ptrtoint double* %45 to i64, !dbg !236
  %49 = ptrtoint i8* %47 to i64, !dbg !236
  %50 = sub i64 %48, %49, !dbg !236
  %51 = shl nuw nsw i64 %42, 3, !dbg !236
  %52 = icmp ult i64 %50, %51, !dbg !236
  %53 = and i1 %.not43, %52, !dbg !236
  br i1 %53, label %idxend, label %oob, !dbg !236

L81:                                              ; preds = %idxend24
  %54 = load {}*, {}** bitcast (i8* getelementptr (i8, i8* @jl_small_typeof, i64 320) to {}**), align 8, !dbg !238, !tbaa !14, !alias.scope !88, !noalias !89, !nonnull !0, !dereferenceable !124, !align !125
  %55 = addrspacecast {}* %54 to {} addrspace(10)*, !dbg !238
  %56 = call noalias nonnull align 8 dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @ijl_box_int64(i64 signext %103) #19, !dbg !238
  %57 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32, {} addrspace(10)*)*, {} addrspace(10)*, {} addrspace(10)*, ...) @julia.call2({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32, {} addrspace(10)*)* noundef nonnull @ijl_invoke, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4987230352 to {}*) to {} addrspace(10)*), {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4985776304 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspacecast ({}* inttoptr (i64 4554404264 to {}*) to {} addrspace(10)*), {} addrspace(10)* %55, {} addrspace(10)* nonnull %56) #21, !dbg !238
  unreachable, !dbg !238

L84:                                              ; preds = %idxend24
  call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 1 %46, i8* align 1 %81, i64 %103, i1 noundef false) #17, !dbg !243, !noalias !245
  call void @llvm.julia.gc_preserve_end(token %102) #17, !dbg !246
  call void @llvm.julia.gc_preserve_end(token %101) #17, !dbg !247
  br label %L95, !dbg !248

L95:                                              ; preds = %L84, %L62
  %exitcond.not = icmp eq i64 %40, 3, !dbg !249
  br i1 %exitcond.not, label %L120, label %L108, !dbg !249

L108:                                             ; preds = %L95
  %58 = add nsw i64 %40, -1, !dbg !251
  %59 = getelementptr inbounds [2 x {} addrspace(10)*], [2 x {} addrspace(10)*]* %arrays, i64 0, i64 %58, !dbg !251
  %60 = load atomic {} addrspace(10)*, {} addrspace(10)** %59 unordered, align 8, !dbg !251, !tbaa !55, !alias.scope !57, !noalias !67, !nonnull !0, !dereferenceable !68, !align !69, !enzyme_type !70
  %61 = add nuw nsw i64 %40, 1, !dbg !252
  %62 = bitcast {} addrspace(10)* %60 to i8 addrspace(10)*, !dbg !253
  %63 = addrspacecast i8 addrspace(10)* %62 to i8 addrspace(11)*, !dbg !253
  %64 = getelementptr inbounds i8, i8 addrspace(11)* %63, i64 16, !dbg !253
  %65 = bitcast i8 addrspace(11)* %64 to i64 addrspace(11)*, !dbg !253
  %66 = load i64, i64 addrspace(11)* %65, align 8, !dbg !253, !tbaa !51, !alias.scope !26, !noalias !29
  %67 = add i64 %66, %38, !dbg !230
  %.not41 = icmp sgt i64 %67, %34, !dbg !232
  br i1 %.not41, label %L114.loopexit, label %L62, !dbg !231

L114.loopexit:                                    ; preds = %L108
  br label %L114, !dbg !255

L114:                                             ; preds = %L114.loopexit, %L38
  %68 = call "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* @ijl_copy_ast({} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4963148896 to {}*) to {} addrspace(10)*)) #17, !dbg !255
  %69 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* noundef nonnull @ijl_apply_generic, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4947783248 to {}*) to {} addrspace(10)*), {} addrspace(10)* nonnull %68) #21, !dbg !256
  %70 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* noundef nonnull @ijl_apply_generic, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4985357072 to {}*) to {} addrspace(10)*), {} addrspace(10)* nonnull %69) #21, !dbg !231
  %71 = addrspacecast {} addrspace(10)* %70 to {} addrspace(12)*, !dbg !231
  call void @ijl_throw({} addrspace(12)* %71) #22, !dbg !231
  unreachable, !dbg !231

L120:                                             ; preds = %L95
  ret {} addrspace(10)* %26, !dbg !257

fail8:                                            ; preds = %L34
  %72 = load {}*, {}** @jl_undefref_exception, align 8, !dbg !225, !tbaa !14, !alias.scope !88, !noalias !89, !nonnull !0
  %73 = addrspacecast {}* %72 to {} addrspace(12)*, !dbg !225
  call void @ijl_throw({} addrspace(12)* %73) #22, !dbg !225
  unreachable, !dbg !225

oob:                                              ; preds = %L66
  %74 = call noalias nonnull align 8 dereferenceable(16) "enzyme_type"="{[-1]:Pointer, [-1,-1]:Pointer, [-1,0,-1]:Float@double, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 16, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4979499040 to {}*) to {} addrspace(10)*)) #20, !dbg !236
  %75 = bitcast {} addrspace(10)* %74 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !236
  %.repack44 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(10)* %75, i64 0, i32 0, !dbg !236
  store i8* %25, i8* addrspace(10)* %.repack44, align 8, !dbg !236, !tbaa !141, !alias.scope !145, !noalias !258
  %.repack45 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(10)* %75, i64 0, i32 1, !dbg !236
  store {} addrspace(10)* %20, {} addrspace(10)* addrspace(10)* %.repack45, align 8, !dbg !236, !tbaa !141, !alias.scope !145, !noalias !258
  %76 = addrspacecast {} addrspace(10)* %74 to {} addrspace(12)*, !dbg !236
  call void @ijl_bounds_error_int({} addrspace(12)* %76, i64 %value_phi1475) #22, !dbg !236
  unreachable, !dbg !236

idxend:                                           ; preds = %L66
  %77 = bitcast {} addrspace(10)* %value_phi1273 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !259
  %78 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %77 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !259
  %79 = bitcast {} addrspace(10)* %value_phi1273 to i8* addrspace(10)*, !dbg !259
  %80 = addrspacecast i8* addrspace(10)* %79 to i8* addrspace(11)*, !dbg !259
  %81 = load i8*, i8* addrspace(11)* %80, align 8, !dbg !259, !tbaa !23, !alias.scope !26, !noalias !29
  %82 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %78, i64 0, i32 1, !dbg !259
  %83 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %82, align 8, !dbg !259, !tbaa !23, !alias.scope !26, !noalias !29, !dereferenceable_or_null !125, !align !69, !enzyme_type !70
  %84 = bitcast {} addrspace(10)* %83 to i64 addrspace(10)*, !dbg !236
  %85 = addrspacecast i64 addrspace(10)* %84 to i64 addrspace(11)*, !dbg !236
  %86 = load i64, i64 addrspace(11)* %85, align 8, !dbg !236, !tbaa !43, !range !106, !alias.scope !26, !noalias !29
  %.not47 = icmp ne i64 %86, 0, !dbg !236
  %87 = bitcast {} addrspace(10)* %83 to { i64, {} addrspace(10)** } addrspace(10)*, !dbg !236
  %88 = addrspacecast { i64, {} addrspace(10)** } addrspace(10)* %87 to { i64, {} addrspace(10)** } addrspace(11)*, !dbg !236
  %89 = getelementptr inbounds { i64, {} addrspace(10)** }, { i64, {} addrspace(10)** } addrspace(11)* %88, i64 0, i32 1, !dbg !236
  %90 = bitcast {} addrspace(10)** addrspace(11)* %89 to i8* addrspace(11)*, !dbg !236
  %91 = load i8*, i8* addrspace(11)* %90, align 8, !dbg !236, !tbaa !14, !alias.scope !88, !noalias !89, !nonnull !0
  %92 = ptrtoint i8* %81 to i64, !dbg !236
  %93 = ptrtoint i8* %91 to i64, !dbg !236
  %94 = sub i64 %92, %93, !dbg !236
  %95 = shl nuw nsw i64 %86, 3, !dbg !236
  %96 = icmp ult i64 %94, %95, !dbg !236
  %97 = and i1 %.not47, %96, !dbg !236
  br i1 %97, label %idxend24, label %oob22, !dbg !236

oob22:                                            ; preds = %idxend
  %98 = call noalias nonnull align 8 dereferenceable(16) "enzyme_type"="{[-1]:Pointer, [-1,-1]:Pointer, [-1,0,-1]:Float@double, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 16, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4979499040 to {}*) to {} addrspace(10)*)) #20, !dbg !236
  %99 = bitcast {} addrspace(10)* %98 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !236
  %.repack48 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(10)* %99, i64 0, i32 0, !dbg !236
  store i8* %81, i8* addrspace(10)* %.repack48, align 8, !dbg !236, !tbaa !141, !alias.scope !145, !noalias !258
  %.repack49 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(10)* %99, i64 0, i32 1, !dbg !236
  store {} addrspace(10)* %83, {} addrspace(10)* addrspace(10)* %.repack49, align 8, !dbg !236, !tbaa !141, !alias.scope !145, !noalias !258
  %100 = addrspacecast {} addrspace(10)* %98 to {} addrspace(12)*, !dbg !236
  call void @ijl_bounds_error_int({} addrspace(12)* %100, i64 noundef 1) #22, !dbg !236
  unreachable, !dbg !236

idxend24:                                         ; preds = %idxend
  %101 = call token (...) @llvm.julia.gc_preserve_begin({} addrspace(10)* %20) #17, !dbg !260
  %102 = call token (...) @llvm.julia.gc_preserve_begin({} addrspace(10)* %83) #17, !dbg !261
  %103 = shl i64 %39, 3, !dbg !262
  %.not51 = icmp sgt i64 %103, -1, !dbg !263
  br i1 %.not51, label %L84, label %L81, !dbg !238
}

Illegal replace ficticious phi for:   %_replacementA = phi {} addrspace(10)* , !dbg !100 of   %26 = call noalias nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 24, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4947034288 to {}*) to {} addrspace(10)*)) #20, !dbg !73
; Function Attrs: mustprogress willreturn
define internal fastcc noalias nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" {} addrspace(10)* @fwddiffejulia_vcat_24743({} addrspace(10)* noundef nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" "enzymejl_parmtype"="4947034288" "enzymejl_parmtype_ref"="2" %0, {} addrspace(10)* align 8 "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" "enzymejl_parmtype"="4947034288" "enzymejl_parmtype_ref"="2" %"'", {} addrspace(10)* noundef nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" "enzymejl_parmtype"="4947034288" "enzymejl_parmtype_ref"="2" %1, {} addrspace(10)* align 8 "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" "enzymejl_parmtype"="4947034288" "enzymejl_parmtype_ref"="2" %"'1") unnamed_addr #16 !dbg !264 {
top:
  %"arrays'ipa" = alloca [2 x {} addrspace(10)*], align 8
  store [2 x {} addrspace(10)*] zeroinitializer, [2 x {} addrspace(10)*]* %"arrays'ipa", align 8
  %arrays = alloca [2 x {} addrspace(10)*], align 8
  %pgcstack = call {}*** @julia.get_pgcstack() #17
  %".fca.0.gep'ipg" = getelementptr inbounds [2 x {} addrspace(10)*], [2 x {} addrspace(10)*]* %"arrays'ipa", i64 0, i64 0
  %.fca.0.gep = getelementptr inbounds [2 x {} addrspace(10)*], [2 x {} addrspace(10)*]* %arrays, i64 0, i64 0
  %".fca.1.gep'ipg" = getelementptr inbounds [2 x {} addrspace(10)*], [2 x {} addrspace(10)*]* %"arrays'ipa", i64 0, i64 1
  %.fca.1.gep = getelementptr inbounds [2 x {} addrspace(10)*], [2 x {} addrspace(10)*]* %arrays, i64 0, i64 1
  store {} addrspace(10)* %"'", {} addrspace(10)** %".fca.0.gep'ipg", align 8, !tbaa !55, !alias.scope !265, !noalias !268
  store {} addrspace(10)* %0, {} addrspace(10)** %.fca.0.gep, align 8, !tbaa !55, !alias.scope !270, !noalias !271
  store {} addrspace(10)* %"'1", {} addrspace(10)** %".fca.1.gep'ipg", align 8, !tbaa !55, !alias.scope !265, !noalias !268
  store {} addrspace(10)* %1, {} addrspace(10)** %.fca.1.gep, align 8, !tbaa !55, !alias.scope !270, !noalias !271
  %current_task134 = getelementptr inbounds {}**, {}*** %pgcstack, i64 -14
  %ptls_field35 = getelementptr inbounds {}**, {}*** %pgcstack, i64 2
  %2 = bitcast {}*** %ptls_field35 to i64***
  %ptls_load3637 = load i64**, i64*** %2, align 8, !tbaa !10, !alias.scope !272, !noalias !275
  %3 = getelementptr inbounds i64*, i64** %ptls_load3637, i64 2
  %safepoint = load i64*, i64** %3, align 8, !tbaa !14, !alias.scope !277, !noalias !280
  fence syncscope("singlethread") seq_cst
  call void @julia.safepoint(i64* %safepoint) #18, !dbg !282
  fence syncscope("singlethread") seq_cst
  %"'ipl" = load atomic {} addrspace(10)*, {} addrspace(10)** %".fca.0.gep'ipg" unordered, align 8, !dbg !283, !tbaa !55, !alias.scope !265, !noalias !287, !nonnull !0, !dereferenceable !68
  %4 = load atomic {} addrspace(10)*, {} addrspace(10)** %.fca.0.gep unordered, align 8, !dbg !283, !tbaa !55, !alias.scope !270, !noalias !288, !nonnull !0, !dereferenceable !68, !align !69, !enzyme_type !70
  %5 = bitcast {} addrspace(10)* %4 to i8 addrspace(10)*, !dbg !289
  %6 = addrspacecast i8 addrspace(10)* %5 to i8 addrspace(11)*, !dbg !289
  %7 = getelementptr inbounds i8, i8 addrspace(11)* %6, i64 16, !dbg !289
  %8 = bitcast i8 addrspace(11)* %7 to i64 addrspace(11)*, !dbg !289
  %9 = load i64, i64 addrspace(11)* %8, align 8, !dbg !289, !tbaa !51, !alias.scope !291, !noalias !294
  %10 = bitcast {} addrspace(10)** %.fca.1.gep to i8 addrspace(10)**, !dbg !296
  %11 = load atomic i8 addrspace(10)*, i8 addrspace(10)** %10 unordered, align 8, !dbg !296, !tbaa !55, !alias.scope !270, !noalias !288, !nonnull !0, !dereferenceable !68, !align !69
  %12 = getelementptr inbounds i8, i8 addrspace(10)* %11, i64 16, !dbg !289
  %13 = bitcast i8 addrspace(10)* %12 to i64 addrspace(10)*, !dbg !289
  %14 = addrspacecast i64 addrspace(10)* %13 to i64 addrspace(11)*, !dbg !289
  %15 = load i64, i64 addrspace(11)* %14, align 8, !dbg !289, !tbaa !51, !alias.scope !299, !noalias !302
  %16 = add i64 %15, %9, !dbg !304
  %17 = bitcast {}*** %current_task134 to {}*
  %.not = icmp eq i64 %16, 0, !dbg !305
  br i1 %.not, label %L34, label %L36, !dbg !305

L34:                                              ; preds = %top
  %18 = load atomic {} addrspace(10)*, {} addrspace(10)** inttoptr (i64 4977410000 to {} addrspace(10)**) unordered, align 16, !dbg !308, !tbaa !14, !alias.scope !309, !noalias !312, !nonnull !0, !enzyme_type !37, !enzymejl_source_type_Memory\7BFloat64\7D !0, !enzymejl_byref_BITS_REF !0
  %.not38 = icmp eq {} addrspace(10)* %18, null, !dbg !308
  br i1 %.not38, label %fail8, label %L38, !dbg !308

L36:                                              ; preds = %top
  %19 = call noalias "enzyme_type"="{[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,-1]:Float@double}" {} addrspace(10)* @jl_alloc_genericmemory({} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4977409968 to {}*) to {} addrspace(10)*), i64 %16) #19, !dbg !314
  %20 = call noalias "enzyme_type"="{[-1]:Pointer, [-1,0]:Integer, [-1,1]:Integer, [-1,2]:Integer, [-1,3]:Integer, [-1,4]:Integer, [-1,5]:Integer, [-1,6]:Integer, [-1,7]:Integer, [-1,8]:Pointer, [-1,8,-1]:Float@double}" {} addrspace(10)* @jl_alloc_genericmemory({} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4977409968 to {}*) to {} addrspace(10)*), i64 %16) #19, !dbg !314
  br label %L38, !dbg !297

L38:                                              ; preds = %L36, %L34
  %21 = phi {} addrspace(10)* [ %20, %L36 ], [ %18, %L34 ]
  %22 = phi {} addrspace(10)* [ %19, %L36 ], [ %18, %L34 ]
  %"'ipc" = bitcast {} addrspace(10)* %21 to { i64, {} addrspace(10)** } addrspace(10)*, !dbg !315
  %23 = bitcast {} addrspace(10)* %22 to { i64, {} addrspace(10)** } addrspace(10)*, !dbg !315
  %"'ipc49" = addrspacecast { i64, {} addrspace(10)** } addrspace(10)* %"'ipc" to { i64, {} addrspace(10)** } addrspace(11)*, !dbg !315
  %24 = addrspacecast { i64, {} addrspace(10)** } addrspace(10)* %23 to { i64, {} addrspace(10)** } addrspace(11)*, !dbg !315
  %"'ipg" = getelementptr inbounds { i64, {} addrspace(10)** }, { i64, {} addrspace(10)** } addrspace(11)* %"'ipc49", i64 0, i32 1, !dbg !315
  %25 = getelementptr inbounds { i64, {} addrspace(10)** }, { i64, {} addrspace(10)** } addrspace(11)* %24, i64 0, i32 1, !dbg !315
  %"'ipc50" = bitcast {} addrspace(10)** addrspace(11)* %"'ipg" to i8* addrspace(11)*, !dbg !315
  %26 = bitcast {} addrspace(10)** addrspace(11)* %25 to i8* addrspace(11)*, !dbg !315
  %"'ipl51" = load i8*, i8* addrspace(11)* %"'ipc50", align 8, !dbg !315, !tbaa !14, !alias.scope !317, !noalias !320, !nonnull !0
  %27 = load i8*, i8* addrspace(11)* %26, align 8, !dbg !315, !tbaa !14, !alias.scope !322, !noalias !323, !nonnull !0, !enzyme_type !34, !enzymejl_source_type_Ptr\7BFloat64\7D !0, !enzymejl_byref_BITS_VALUE !0
  %_replacementA = phi {} addrspace(10)* , !dbg !316
  %28 = bitcast {} addrspace(10)* %_replacementA to i8 addrspace(10)*, !dbg !316
  %29 = getelementptr inbounds i8, i8 addrspace(10)* %28, i64 0, !dbg !316
  %30 = bitcast i8 addrspace(10)* %29 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !316
  %31 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %30 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !316
  %32 = getelementptr { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %31, i64 0, i32 1, !dbg !316
  store atomic {} addrspace(10)* @ejl_jl_nothing, {} addrspace(10)* addrspace(11)* %32 syncscope("singlethread") release, align 8, !dbg !316, !enzymejl_atomicgc !0
  %33 = getelementptr inbounds i8, i8 addrspace(10)* %28, i64 16, !dbg !316
  %34 = call noalias nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 24, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4947034288 to {}*) to {} addrspace(10)*)) #20, !dbg !316
  %"'ipc53" = bitcast {} addrspace(10)* %34 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !316
  %"'ipc55" = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %"'ipc53" to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !316
  %".repack'ipg" = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %"'ipc55", i64 0, i32 0, !dbg !316
  store i8* %"'ipl51", i8* addrspace(11)* %".repack'ipg", align 8, !dbg !316, !tbaa !23, !alias.scope !324, !noalias !327
  %".repack39'ipg" = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %"'ipc55", i64 0, i32 1, !dbg !316
  store {} addrspace(10)* %21, {} addrspace(10)* addrspace(11)* %".repack39'ipg", align 8, !dbg !316, !tbaa !23, !alias.scope !324, !noalias !327
  %"'ipc57" = bitcast {} addrspace(10)* %34 to i8 addrspace(10)*, !dbg !316
  %"'ipc59" = addrspacecast i8 addrspace(10)* %"'ipc57" to i8 addrspace(11)*, !dbg !316
  %"'ipg61" = getelementptr inbounds i8, i8 addrspace(11)* %"'ipc59", i64 16, !dbg !316
  %"'ipc63" = bitcast i8 addrspace(11)* %"'ipg61" to i64 addrspace(11)*, !dbg !316
  store i64 %16, i64 addrspace(11)* %"'ipc63", align 8, !dbg !316, !tbaa !51, !alias.scope !324, !noalias !327
  %35 = add i64 %9, 1, !dbg !329
  %36 = add i64 %16, 1, !dbg !329
  %.not4172 = icmp sgt i64 %35, %36, !dbg !331
  br i1 %.not4172, label %L114, label %L62.lr.ph, !dbg !330

L62.lr.ph:                                        ; preds = %L38
  %37 = bitcast {} addrspace(10)* %22 to i64 addrspace(10)*
  %38 = addrspacecast i64 addrspace(10)* %37 to i64 addrspace(11)*
  %"'ipc64" = bitcast i8* %"'ipl51" to double*
  %39 = bitcast i8* %27 to double*
  br label %L62, !dbg !330

L62:                                              ; preds = %L108, %L62.lr.ph
  %iv = phi i64 [ %iv.next, %L108 ], [ 0, %L62.lr.ph ]
  %40 = phi i64 [ %35, %L62.lr.ph ], [ %69, %L108 ]
  %41 = phi i64 [ %9, %L62.lr.ph ], [ %68, %L108 ]
  %value_phi1475 = phi i64 [ 1, %L62.lr.ph ], [ %40, %L108 ]
  %42 = phi {} addrspace(10)* [ %"'ipl", %L62.lr.ph ], [ %"'ipl68", %L108 ]
  %value_phi1273 = phi {} addrspace(10)* [ %4, %L62.lr.ph ], [ %63, %L108 ]
  %iv.next = add nuw nsw i64 %iv, 1, !dbg !332
  %43 = add nuw nsw i64 %iv, 2, !dbg !332
  %.not42 = icmp eq i64 %41, 0, !dbg !332
  br i1 %.not42, label %L95, label %L66, !dbg !333

L66:                                              ; preds = %L62
  %44 = add i64 %value_phi1475, -1, !dbg !335
  %45 = load i64, i64 addrspace(11)* %38, align 8, !dbg !335, !tbaa !43, !range !106, !alias.scope !337, !noalias !338, !enzyme_type !45, !enzymejl_byref_BITS_VALUE !0, !enzymejl_source_type_Int64 !0, !enzyme_inactive !0
  %46 = add i64 %45, %44, !dbg !335
  %47 = shl nuw nsw i64 %45, 1, !dbg !335
  %.not43 = icmp ult i64 %46, %47, !dbg !335
  %"'ipg65" = getelementptr inbounds double, double* %"'ipc64", i64 %44, !dbg !335
  %48 = getelementptr inbounds double, double* %39, i64 %44, !dbg !335
  %"'ipc66" = bitcast double* %"'ipg65" to i8*, !dbg !335
  %49 = bitcast double* %48 to i8*, !dbg !335
  %50 = load i8*, i8* addrspace(11)* %26, align 8, !dbg !335, !tbaa !14, !alias.scope !322, !noalias !323, !nonnull !0, !enzyme_type !34, !enzymejl_source_type_Ptr\7BFloat64\7D !0, !enzymejl_byref_BITS_VALUE !0
  %51 = ptrtoint double* %48 to i64, !dbg !335
  %52 = ptrtoint i8* %50 to i64, !dbg !335
  %53 = sub i64 %51, %52, !dbg !335
  %54 = shl nuw nsw i64 %45, 3, !dbg !335
  %55 = icmp ult i64 %53, %54, !dbg !335
  %56 = and i1 %.not43, %55, !dbg !335
  br i1 %56, label %idxend, label %oob, !dbg !335

L81:                                              ; preds = %idxend24
  %57 = load {}*, {}** bitcast (i8* getelementptr (i8, i8* @jl_small_typeof, i64 320) to {}**), align 8, !dbg !339, !tbaa !14, !alias.scope !88, !noalias !89, !nonnull !0, !dereferenceable !124, !align !125
  %58 = addrspacecast {}* %57 to {} addrspace(10)*, !dbg !339
  %59 = call noalias nonnull align 8 dereferenceable(8) "enzyme_inactive" "enzyme_type"="{[-1]:Pointer, [-1,-1]:Integer}" {} addrspace(10)* @ijl_box_int64(i64 signext %105) #19, !dbg !339
  %60 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32, {} addrspace(10)*)*, {} addrspace(10)*, {} addrspace(10)*, ...) @julia.call2({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32, {} addrspace(10)*)* noundef nonnull @ijl_invoke, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4987230352 to {}*) to {} addrspace(10)*), {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4985776304 to {}*) to {} addrspace(10)*), {} addrspace(10)* addrspacecast ({}* inttoptr (i64 4554404264 to {}*) to {} addrspace(10)*), {} addrspace(10)* %58, {} addrspace(10)* nonnull %59) #21, !dbg !339
  unreachable, !dbg !339

L84:                                              ; preds = %idxend24
  call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 1 %"'ipc66", i8* align 1 %"'ipl72", i64 %105, i1 noundef false) #17, !dbg !344, !noalias !245
  call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 1 %49, i8* align 1 %83, i64 %105, i1 noundef false) #17, !dbg !344, !noalias !346
  call void @llvm.julia.gc_preserve_end(token %104) #17, !dbg !349
  call void @llvm.julia.gc_preserve_end(token %103) #17, !dbg !350
  br label %L95, !dbg !351

L95:                                              ; preds = %L84, %L62
  %exitcond.not = icmp eq i64 %43, 3, !dbg !352
  br i1 %exitcond.not, label %L120, label %L108, !dbg !352

L108:                                             ; preds = %L95
  %61 = add nsw i64 %43, -1, !dbg !354
  %"'ipg67" = getelementptr inbounds [2 x {} addrspace(10)*], [2 x {} addrspace(10)*]* %"arrays'ipa", i64 0, i64 %61, !dbg !354
  %62 = getelementptr inbounds [2 x {} addrspace(10)*], [2 x {} addrspace(10)*]* %arrays, i64 0, i64 %61, !dbg !354
  %"'ipl68" = load atomic {} addrspace(10)*, {} addrspace(10)** %"'ipg67" unordered, align 8, !dbg !354, !tbaa !55, !alias.scope !265, !noalias !287, !nonnull !0, !dereferenceable !68
  %63 = load atomic {} addrspace(10)*, {} addrspace(10)** %62 unordered, align 8, !dbg !354, !tbaa !55, !alias.scope !270, !noalias !288, !nonnull !0, !dereferenceable !68, !align !69, !enzyme_type !70
  %64 = bitcast {} addrspace(10)* %63 to i8 addrspace(10)*, !dbg !355
  %65 = addrspacecast i8 addrspace(10)* %64 to i8 addrspace(11)*, !dbg !355
  %66 = getelementptr inbounds i8, i8 addrspace(11)* %65, i64 16, !dbg !355
  %67 = bitcast i8 addrspace(11)* %66 to i64 addrspace(11)*, !dbg !355
  %68 = load i64, i64 addrspace(11)* %67, align 8, !dbg !355, !tbaa !51, !alias.scope !357, !noalias !360
  %69 = add i64 %68, %40, !dbg !329
  %.not41 = icmp sgt i64 %69, %36, !dbg !331
  br i1 %.not41, label %L114.loopexit, label %L62, !dbg !330

L114.loopexit:                                    ; preds = %L108
  br label %L114, !dbg !362

L114:                                             ; preds = %L114.loopexit, %L38
  %70 = call "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* @ijl_copy_ast({} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4963148896 to {}*) to {} addrspace(10)*)) #17, !dbg !362
  %71 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* noundef nonnull @ijl_apply_generic, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4947783248 to {}*) to {} addrspace(10)*), {} addrspace(10)* nonnull %70) #21, !dbg !363
  %72 = call nonnull "enzyme_type"="{[-1]:Pointer}" {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* noundef nonnull @ijl_apply_generic, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4985357072 to {}*) to {} addrspace(10)*), {} addrspace(10)* nonnull %71) #21, !dbg !330
  %73 = addrspacecast {} addrspace(10)* %72 to {} addrspace(12)*, !dbg !330
  call void @ijl_throw({} addrspace(12)* %73) #22, !dbg !330
  unreachable, !dbg !330

L120:                                             ; preds = %L95
  ret {} addrspace(10)* %34

fail8:                                            ; preds = %L34
  %74 = load {}*, {}** @jl_undefref_exception, align 8, !dbg !308, !tbaa !14, !alias.scope !88, !noalias !89, !nonnull !0
  %75 = addrspacecast {}* %74 to {} addrspace(12)*, !dbg !308
  call void @ijl_throw({} addrspace(12)* %75) #22, !dbg !308
  unreachable, !dbg !308

oob:                                              ; preds = %L66
  %76 = call noalias nonnull align 8 dereferenceable(16) "enzyme_type"="{[-1]:Pointer, [-1,-1]:Pointer, [-1,0,-1]:Float@double, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 16, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4979499040 to {}*) to {} addrspace(10)*)) #20, !dbg !335
  %77 = bitcast {} addrspace(10)* %76 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !335
  %.repack44 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(10)* %77, i64 0, i32 0, !dbg !335
  store i8* %27, i8* addrspace(10)* %.repack44, align 8, !dbg !335, !tbaa !141, !alias.scope !145, !noalias !364
  %.repack45 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(10)* %77, i64 0, i32 1, !dbg !335
  store {} addrspace(10)* %22, {} addrspace(10)* addrspace(10)* %.repack45, align 8, !dbg !335, !tbaa !141, !alias.scope !145, !noalias !364
  %78 = addrspacecast {} addrspace(10)* %76 to {} addrspace(12)*, !dbg !335
  call void @ijl_bounds_error_int({} addrspace(12)* %78, i64 %value_phi1475) #22, !dbg !335
  unreachable, !dbg !335

idxend:                                           ; preds = %L66
  %"'ipc73" = bitcast {} addrspace(10)* %42 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !365
  %79 = bitcast {} addrspace(10)* %value_phi1273 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !365
  %"'ipc74" = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %"'ipc73" to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !365
  %80 = addrspacecast { i8*, {} addrspace(10)* } addrspace(10)* %79 to { i8*, {} addrspace(10)* } addrspace(11)*, !dbg !365
  %"'ipc70" = bitcast {} addrspace(10)* %42 to i8* addrspace(10)*, !dbg !365
  %81 = bitcast {} addrspace(10)* %value_phi1273 to i8* addrspace(10)*, !dbg !365
  %"'ipc71" = addrspacecast i8* addrspace(10)* %"'ipc70" to i8* addrspace(11)*, !dbg !365
  %82 = addrspacecast i8* addrspace(10)* %81 to i8* addrspace(11)*, !dbg !365
  %"'ipl72" = load i8*, i8* addrspace(11)* %"'ipc71", align 8, !dbg !365, !tbaa !23, !alias.scope !366, !noalias !369
  %83 = load i8*, i8* addrspace(11)* %82, align 8, !dbg !365, !tbaa !23, !alias.scope !371, !noalias !372
  %"'ipg75" = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %"'ipc74", i64 0, i32 1, !dbg !365
  %84 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(11)* %80, i64 0, i32 1, !dbg !365
  %"'ipl76" = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %"'ipg75", align 8, !dbg !365, !tbaa !23, !alias.scope !366, !noalias !369, !dereferenceable_or_null !125
  %85 = load {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %84, align 8, !dbg !365, !tbaa !23, !alias.scope !371, !noalias !372, !dereferenceable_or_null !125, !align !69, !enzyme_type !70
  %86 = bitcast {} addrspace(10)* %85 to i64 addrspace(10)*, !dbg !335
  %87 = addrspacecast i64 addrspace(10)* %86 to i64 addrspace(11)*, !dbg !335
  %88 = load i64, i64 addrspace(11)* %87, align 8, !dbg !335, !tbaa !43, !range !106, !alias.scope !373, !noalias !376
  %.not47 = icmp ne i64 %88, 0, !dbg !335
  %89 = bitcast {} addrspace(10)* %85 to { i64, {} addrspace(10)** } addrspace(10)*, !dbg !335
  %90 = addrspacecast { i64, {} addrspace(10)** } addrspace(10)* %89 to { i64, {} addrspace(10)** } addrspace(11)*, !dbg !335
  %91 = getelementptr inbounds { i64, {} addrspace(10)** }, { i64, {} addrspace(10)** } addrspace(11)* %90, i64 0, i32 1, !dbg !335
  %92 = bitcast {} addrspace(10)** addrspace(11)* %91 to i8* addrspace(11)*, !dbg !335
  %93 = load i8*, i8* addrspace(11)* %92, align 8, !dbg !335, !tbaa !14, !alias.scope !378, !noalias !379, !nonnull !0
  %94 = ptrtoint i8* %83 to i64, !dbg !335
  %95 = ptrtoint i8* %93 to i64, !dbg !335
  %96 = sub i64 %94, %95, !dbg !335
  %97 = shl nuw nsw i64 %88, 3, !dbg !335
  %98 = icmp ult i64 %96, %97, !dbg !335
  %99 = and i1 %.not47, %98, !dbg !335
  br i1 %99, label %idxend24, label %oob22, !dbg !335

oob22:                                            ; preds = %idxend
  %100 = call noalias nonnull align 8 dereferenceable(16) "enzyme_type"="{[-1]:Pointer, [-1,-1]:Pointer, [-1,0,-1]:Float@double, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 16, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4979499040 to {}*) to {} addrspace(10)*)) #20, !dbg !335
  %101 = bitcast {} addrspace(10)* %100 to { i8*, {} addrspace(10)* } addrspace(10)*, !dbg !335
  %.repack48 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(10)* %101, i64 0, i32 0, !dbg !335
  store i8* %83, i8* addrspace(10)* %.repack48, align 8, !dbg !335, !tbaa !141, !alias.scope !145, !noalias !364
  %.repack49 = getelementptr inbounds { i8*, {} addrspace(10)* }, { i8*, {} addrspace(10)* } addrspace(10)* %101, i64 0, i32 1, !dbg !335
  store {} addrspace(10)* %85, {} addrspace(10)* addrspace(10)* %.repack49, align 8, !dbg !335, !tbaa !141, !alias.scope !145, !noalias !364
  %102 = addrspacecast {} addrspace(10)* %100 to {} addrspace(12)*, !dbg !335
  call void @ijl_bounds_error_int({} addrspace(12)* %102, i64 noundef 1) #22, !dbg !335
  unreachable, !dbg !335

idxend24:                                         ; preds = %idxend
  %103 = call token (...) @llvm.julia.gc_preserve_begin({} addrspace(10)* %22, {} addrspace(10)* %21), !dbg !380
  %104 = call token (...) @llvm.julia.gc_preserve_begin({} addrspace(10)* %85, {} addrspace(10)* %"'ipl76"), !dbg !381
  %105 = shl i64 %41, 3, !dbg !382
  %.not51 = icmp sgt i64 %105, -1, !dbg !383
  br i1 %.not51, label %L84, label %L81, !dbg !339

allocsForInversion:                               ; No predecessors!
  %"iv'ac" = alloca i64, align 8
}

LLVM.CallInst(%26 = call noalias nonnull align 8 dereferenceable(24) "enzyme_type"="{[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Float@double, [-1,8]:Pointer, [-1,8,0]:Integer, [-1,8,1]:Integer, [-1,8,2]:Integer, [-1,8,3]:Integer, [-1,8,4]:Integer, [-1,8,5]:Integer, [-1,8,6]:Integer, [-1,8,7]:Integer, [-1,8,8]:Pointer, [-1,8,8,-1]:Float@double, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer}" {} addrspace(10)* @julia.gc_alloc_obj({}* nonnull %17, i64 noundef 24, {} addrspace(10)* noundef addrspacecast ({}* inttoptr (i64 4947034288 to {}*) to {} addrspace(10)*)) #20, !dbg !73)
LLVM.PHIInst(%_replacementA = phi {} addrspace(10)* , !dbg !100)


Stacktrace:
 [1] Array
   @ ./boot.jl:579
 [2] vcat
   @ ./array.jl:2228

Stacktrace:
  [1] julia_error(msg::String, val::Ptr{…}, errtype::Enzyme.API.ErrorType, data::Ptr{…}, data2::Ptr{…}, B::Ptr{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/errors.jl:384
  [2] julia_error(cstr::Cstring, val::Ptr{…}, errtype::Enzyme.API.ErrorType, data::Ptr{…}, data2::Ptr{…}, B::Ptr{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/errors.jl:210
  [3] EnzymeCreateForwardDiff(logic::Enzyme.Logic, todiff::LLVM.Function, retType::Enzyme.API.CDIFFE_TYPE, constant_args::Vector{…}, TA::Enzyme.TypeAnalysis, returnValue::Bool, mode::Enzyme.API.CDerivativeMode, runtimeActivity::Bool, width::Int64, additionalArg::Ptr{…}, typeInfo::Enzyme.FnTypeInfo, uncacheable_args::Vector{…})
    @ Enzyme.API ~/.julia/packages/Enzyme/DL6fx/src/api.jl:334
  [4] enzyme!(job::GPUCompiler.CompilerJob{…}, mod::LLVM.Module, primalf::LLVM.Function, TT::Type, mode::Enzyme.API.CDerivativeMode, width::Int64, parallel::Bool, actualRetType::Type, wrap::Bool, modifiedBetween::NTuple{…} where N, returnPrimal::Bool, expectedTapeType::Type, loweredArgs::Set{…}, boxedArgs::Set{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:1729
  [5] codegen(output::Symbol, job::GPUCompiler.CompilerJob{…}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, toplevel::Bool, strip::Bool, validate::Bool, only_entry::Bool, parent_job::Nothing)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:4534
  [6] codegen
    @ ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:3337 [inlined]
  [7] _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5386
  [8] _thunk
    @ ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5386 [inlined]
  [9] cached_compilation
    @ ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5438 [inlined]
 [10] thunkbase(mi::Core.MethodInstance, World::UInt64, FA::Type{…}, A::Type{…}, TT::Type, Mode::Enzyme.API.CDerivativeMode, width::Int64, ModifiedBetween::NTuple{…} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, edges::Vector{…})
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5549
 [11] thunk_generator(world::UInt64, source::LineNumberNode, FA::Type, A::Type, TT::Type, Mode::Enzyme.API.CDerivativeMode, Width::Int64, ModifiedBetween::NTuple{…} where N, ReturnPrimal::Bool, ShadowInit::Bool, ABI::Type, ErrIfFuncWritten::Bool, RuntimeActivity::Bool, self::Any, fakeworld::Any, fa::Type, a::Type, tt::Type, mode::Type, width::Type, modifiedbetween::Type, returnprimal::Type, shadowinit::Type, abi::Type, erriffuncwritten::Type, runtimeactivity::Type)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/DL6fx/src/compiler.jl:5734
 [12] autodiff
    @ ~/.julia/packages/Enzyme/DL6fx/src/Enzyme.jl:640 [inlined]
 [13] autodiff
    @ ~/.julia/packages/Enzyme/DL6fx/src/Enzyme.jl:544 [inlined]
 [14] autodiff
    @ ~/.julia/packages/Enzyme/DL6fx/src/Enzyme.jl:516 [inlined]
 [15] pushforward(::typeof(f), ::DifferentiationInterface.NoPushforwardPrep, ::AutoEnzyme{…}, ::Matrix{…}, ::Tuple{…})
    @ DifferentiationInterfaceEnzymeExt ~/.julia/packages/DifferentiationInterface/6QHLL/ext/DifferentiationInterfaceEnzymeExt/forward_onearg.jl:60
 [16] pushforward(::typeof(f), ::AutoEnzyme{Nothing, Nothing}, ::Matrix{Float64}, ::Tuple{Matrix{Float64}})
    @ DifferentiationInterface ~/.julia/packages/DifferentiationInterface/6QHLL/src/fallbacks/no_prep.jl:128
 [17] top-level scope
    @ ~/Downloads/Untitled-1.jl:6
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions