diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -2744,15 +2744,7 @@ continue; } - if (isFreeCall(I, &TLI) && getAllocationFamily(I, &TLI) == Family) { - assert(Family); - Users.emplace_back(I); - continue; - } - - if (isReallocLikeFn(I, &TLI) && - getAllocationFamily(I, &TLI) == Family) { - assert(Family); + if (Family && getAllocationFamily(I, &TLI) == Family) { Users.emplace_back(I); Worklist.push_back(I); continue;