[PHITransAddr] Don't assume that instruction operands are translatable
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 9 Aug 2015 15:43:02 +0000 (15:43 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 9 Aug 2015 15:43:02 +0000 (15:43 +0000)
commit9585c546b9a209ff25c73f4be50c51cfd4c29b70
treeb78aa3618ac86607dbea12c79a01502077cbb1d3
parent97bdbf60d9923a9e06effbb96801129070499fd5
[PHITransAddr] Don't assume that instruction operands are translatable

We can only PHI translate instructions.  In our attempt to PHI translate
a bitcast, we attempt to translate its operand; however, the operand
might be an argument or a global instead of an instruction.  Benignly
bail out when this happens.

This fixes PR24397.

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

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