[CodeGenPrepare] Fix ModifiedDT flag in optimizeSelectInst
authorRong Xu <xur@google.com>
Fri, 8 Mar 2019 22:46:18 +0000 (22:46 +0000)
committerRong Xu <xur@google.com>
Fri, 8 Mar 2019 22:46:18 +0000 (22:46 +0000)
commitce3be45cacc168194bb7d5e84de365548e1c49a2
treef98ca00a1e1a82e11570e394348835fece3297aa
parent942e6c7c9e36b7d71ad04d323ddb5c15c100b13b
[CodeGenPrepare] Fix ModifiedDT flag in optimizeSelectInst

r44412 fixed a huge compile time regression but it needed ModifiedDT flag to be
maintained correctly in optimizations in optimizeBlock() and optimizeInst().
Function optimizeSelectInst() does not update the flag.
This patch propagates the flag in optimizeSelectInst() back to
optimizeBlock().

This patch also removes ModifiedDT in CodeGenPrepare class (which is not used).
The property of ModifiedDT is now recorded in a ref parameter.

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

llvm-svn: 355751
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/Transforms/CodeGenPrepare/X86/optimizeSelect-DT.ll [new file with mode: 0644]