[GlobalOpt] Fix an incorrect Modified status
authorDavid Stenberg <david.stenberg@ericsson.com>
Thu, 20 Aug 2020 07:05:37 +0000 (09:05 +0200)
committerDavid Stenberg <david.stenberg@ericsson.com>
Thu, 20 Aug 2020 09:52:09 +0000 (11:52 +0200)
commit8206257cb86b50f266df5988aa2604c836e1c95c
treeffeed932da9ff3f0248b0c1cd2e261bf326346c7
parent7a1029fd1e415d3e21430fc18ed5cc2e79756e3c
[GlobalOpt] Fix an incorrect Modified status

When removing a non-constant store to a global in
CleanupPointerRootUsers(), the GlobalOpt pass could incorrectly return
false.

This was caught using the check introduced by D80916.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D86149
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Transforms/GlobalOpt/dead-store-status.ll [new file with mode: 0644]