[PHITransAddr] Don't translate unreachable values
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 1 Jun 2015 00:15:08 +0000 (00:15 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 1 Jun 2015 00:15:08 +0000 (00:15 +0000)
commit75ce6bba4e612b2fa474a0772cc2331c909b95f7
treef664743822de73e8f0f65e4fd3e7aca1c64284fb
parent5a130506287bd2e0ea8f8089a4091e60ea154729
[PHITransAddr] Don't translate unreachable values

Unreachable values may use themselves in strange ways due to their
dominance property.  Attempting to translate through them can lead to
infinite recursion, crashing LLVM.  Instead, claim that we weren't able
to translate the value.

This fixes PR23096.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238702 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/PHITransAddr.h
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Analysis/PHITransAddr.cpp
test/Transforms/GVN/unreachable_block_infinite_loop.ll