[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)
commit7666be70e4df1e20dbbd606a343b822fa440ef3b
tree33c7977ef76bdd17972ab5bd9e05d52c2ddb8b99
parentfc41f63d77d5566199f0e443e8a0a58da8f3fe51
[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.

llvm-svn: 238702
llvm/include/llvm/Analysis/PHITransAddr.h
llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
llvm/lib/Analysis/PHITransAddr.cpp
llvm/test/Transforms/GVN/unreachable_block_infinite_loop.ll