Recommit r333268: [IPSCCP] Use PredicateInfo to propagate facts from cmp instructions.
authorFlorian Hahn <florian.hahn@arm.com>
Thu, 23 Aug 2018 11:04:00 +0000 (11:04 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Thu, 23 Aug 2018 11:04:00 +0000 (11:04 +0000)
commit3052290dc04e9c876ce47b469f276134c3d25242
tree098ea903471944ec7e7b7e1d30ebc5a9c40f8a91
parent9f356ddec88e0e49804e14ff2fafcf125da17481
Recommit r333268: [IPSCCP] Use PredicateInfo to propagate facts from cmp instructions.

This version of the patch fixes cleaning up ssa_copy intrinsics, so it does not
crash for instructions in blocks that have been marked unreachable.

This patch updates IPSCCP to use PredicateInfo to propagate
facts to true branches predicated by EQ and to false branches
predicated by NE.

As a follow up, we should be able to extend it to also propagate additional
facts about nonnull.

Reviewers: davide, mssimpso, dberlin, efriedma

Reviewed By: davide, dberlin

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

llvm-svn: 340525
llvm/include/llvm/Transforms/Scalar/SCCP.h
llvm/lib/Transforms/IPO/SCCP.cpp
llvm/lib/Transforms/Scalar/SCCP.cpp
llvm/test/Other/new-pm-lto-defaults.ll
llvm/test/Other/opt-O2-pipeline.ll
llvm/test/Other/opt-O3-pipeline.ll
llvm/test/Other/opt-Os-pipeline.ll
llvm/test/Transforms/IPConstantProp/musttail-call.ll