SuccessChanges

Summary

  1. [InstCombine] avoid crash from deleting an instruction that still has (details)
Commit ef02831f0a4e3b3ccaa45a5589e4cabecbf527ab by spatel
[InstCombine] avoid crash from deleting an instruction that still has
uses (PR43723)
We gather a set of white-listed instructions in isAllocSiteRemovable()
and then replace/erase them. But we don't know in general if the
instructions in the set have uses amongst themselves, so order of
deletion makes a difference.
There's already a special-case for the llvm.objectsize intrinsic, so add
another for llvm.invariant.end.
Should fix: https://bugs.llvm.org/show_bug.cgi?id=43723
Differential Revision: https://reviews.llvm.org/D69977
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/test/Transforms/InstCombine/builtin-object-size-ptr.ll