[InstSimplify] Report "Changed" also when only deleting dead instructions
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Fri, 9 Aug 2019 07:08:25 +0000 (07:08 +0000)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Fri, 9 Aug 2019 07:08:25 +0000 (07:08 +0000)
commitd218a3326e7152469f0c6837f682645ffff0fcbc
tree93038296a08233730971bb97d592052fceac6de5
parent6179175551c04877cc580e2973b239e9d2e7d394
[InstSimplify] Report "Changed" also when only deleting dead instructions

Summary:
Make sure that we report that changes has been made
by InstSimplify also in situations when only trivially
dead instructions has been removed. If for example a call
is removed the call graph must be updated.

Bug seem to have been introduced by llvm-svn r367173
(commit 02b9e45a7e4b81), since the code in question
was rewritten in that commit.

Reviewers: spatel, chandlerc, foad

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65973

llvm-svn: 368401
llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
llvm/test/Transforms/InstSimplify/remove-dead-call.ll [new file with mode: 0755]