Commit Graph

2 Commits

Author SHA1 Message Date
Max Kazantsev f8a42bca28 [ADCE] Fix incorrect reporting of CFG changes
This patch fixes 2 related bugs in ADCE:
- `performDeadCodeElimination` does not report changes if it did ONLY
  CFG changes (affects both old and new pass managers);
- When control flow removal is enabled, new pass manager does not
  drop CFG analyses.

Both can lead to incorrect loop info after ADCE that does only CFG changes.

Differential Revision: https://reviews.llvm.org/D78103
Reviewed By: Denis Antrushin
2020-04-14 20:26:13 +07:00
Max Kazantsev 2c4d914eeb [Test] Add failing test that demonstrates buggy behavior of ADCE
ADCE messes up with loop info (proved for new pass manager only) by
making some loop blocks unreachable, without making proper updates
to the loop.
2020-04-14 18:47:04 +07:00