diff --git a/enzyme/Enzyme/CApi.cpp b/enzyme/Enzyme/CApi.cpp index 4e583273698a..14215fb6dd2b 100644 --- a/enzyme/Enzyme/CApi.cpp +++ b/enzyme/Enzyme/CApi.cpp @@ -1966,6 +1966,12 @@ void EnzymeFixupJuliaCallingConvention(LLVMValueRef F_C) { outinds.push_back(ConstantInt::get(B.getInt32Ty(), v)); } + if (isa(in) || isa(in)) + return; + + if (isa(out) || isa(out)) + return; + if (outinds.size() > 1) out = B.CreateInBoundsGEP(sretTy, out, outinds); if (ininds.size() > 1)