[SimplifyCFG] Fix crash in the EXPENSIVE_CHECKS build
authorJon Roelofs <jonathan_roelofs@apple.com>
Thu, 16 Jul 2020 21:10:22 +0000 (15:10 -0600)
committerJon Roelofs <jonathan_roelofs@apple.com>
Thu, 16 Jul 2020 21:34:41 +0000 (15:34 -0600)
commita0537fc35f0e72123e426ced7879188aaab6f76b
treeac90603b0470b72b34b0d4eab2f46bde5106eaaf
parent2dd9e43579b341e5de238de924cc910042b0194e
[SimplifyCFG] Fix crash in the EXPENSIVE_CHECKS build

SimplifyCFG was incorrectly reporting to the pass manager that it had not made
changes after folding away a PHI.  This is detected in the EXPENSIVE_CHECKS
build when the function's hash changes.

Differential Revision: https://reviews.llvm.org/D83985
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll [new file with mode: 0644]