GVN: If a branch has two identical successors, we cannot declare either dead.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 25 Jun 2015 18:32:02 +0000 (18:32 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 25 Jun 2015 18:32:02 +0000 (18:32 +0000)
commit2a3443c7c5eb314aba8bce2f38d8846ecb815f85
tree1974cde24ccc4db78336692283eb5447149d8c61
parentd21e5c6684642a4e17b0f6d7802d55b0a32c5837
GVN: If a branch has two identical successors, we cannot declare either dead.

This previously caused miscompilations as a result of phi nodes receiving
undef incoming values from blocks dominated by such successors.

Differential Revision: http://reviews.llvm.org/D10726

llvm-svn: 240670
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/test/Transforms/GVN/br-identical.ll [new file with mode: 0644]