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)
commit8d5e4e48bced6a230acba41754ad7eca46d6ff0d
tree12daf32d850aa1a0e6be6d142fb3ca7d756fedea
parentb12380a76d6616e621a2b01581c15784dd013fcf
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240670 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/br-identical.ll [new file with mode: 0644]