diff --git a/enzyme/Enzyme/Enzyme.cpp b/enzyme/Enzyme/Enzyme.cpp index 055b6f394842..61ff9ebb15d5 100644 --- a/enzyme/Enzyme/Enzyme.cpp +++ b/enzyme/Enzyme/Enzyme.cpp @@ -2110,8 +2110,7 @@ class EnzymeBase { // Move the truncated body into the original function F.deleteBody(); - F.getBasicBlockList().splice(F.begin(), - TruncatedFunc->getBasicBlockList()); + F.splice(F.begin(), TruncatedFunc); RemapFunction(F, Mapping, RF_NoModuleLevelChanges | RF_IgnoreMissingLocals); TruncatedFunc->deleteBody();