FailedChanges

Summary

  1. Revert "[DBG][OPT] Attempt to salvage or undef debug info when removing (details)
  2. [InstCombine] avoid crash from deleting an instruction that still has (details)
Commit 9f48a160dd3fd56314cfbbe74c56e09aaab11566 by Tom.Weaver
Revert "[DBG][OPT] Attempt to salvage or undef debug info when removing
trivially deletable instructions in the Reassociate Expression pass."
This reverts commit 1984a27db58e9053371ab6d6dc288c81c8a071ac.
The file was removedllvm/lib/Transforms/Scalar/Reassociate.cpp.rej
The file was removedllvm/test/Transforms/Reassociate/undef_intrinsics_when_deleting_instructions.ll
The file was removedllvm/test/Transforms/Reassociate/reassociate_salvages_debug_info.ll
Commit 3db8a3ef86e7b3331ab466a78c10a62be9e69829 by spatel
[InstCombine] avoid crash from deleting an instruction that still has
uses (PR43723) (3rd try)
Re-try because earlier attempts were reverted due to use-after-free.
Hopefully, diagnosed correctly this time - we replace/remove the
invariant.start first rather than the invariant.end to avoid angering
worklist-based iteration.
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.start.
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