[PATCH] D85839: [InstCombine] Fix incorrect Modified status

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 08:13:14 PDT 2020


dstenb created this revision.
dstenb added reviewers: nikic, majnemer.
Herald added subscribers: llvm-commits, hiraditya, aprantl.
Herald added a project: LLVM.
dstenb requested review of this revision.

When removing instructions from unreachable blocks, and only debug info
intrinsics were removed, InstCombine could incorrectly return a false
Modified status.

      

This is fixed by making removeAllNonTerminatorAndEHPadInstructions()
also return how many debug info intrinsics that were removed, and take
that into account.

      

This was caught using the check introduced by D80916 <https://reviews.llvm.org/D80916>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85839

Files:
  llvm/include/llvm/Transforms/Utils/Local.h
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/lib/Transforms/Scalar/SCCP.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/test/Transforms/InstCombine/unreachable-dbg-info-modified.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85839.285088.patch
Type: text/x-patch
Size: 5217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200812/31eca209/attachment.bin>


More information about the llvm-commits mailing list