[SimplifyCFG] Don't use-after-free an SSA value
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 21 Oct 2015 18:22:24 +0000 (18:22 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 21 Oct 2015 18:22:24 +0000 (18:22 +0000)
commit9f1da8432d2c0079774d65166fd89c4da109ac33
tree8cefa9646305fb9e291e6b3737cf159f3473d062
parent7d30a2ed8bbfb77386e3198a74f0288aec52e874
[SimplifyCFG] Don't use-after-free an SSA value

SimplifyTerminatorOnSelect didn't consider the possibility that the
condition might be related to one of PHI nodes.

This fixes PR25267.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250922 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/PR25267.ll [new file with mode: 0644]