[ShrinkWrap] Fix FindIDom to only have one kind of failure.
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 6 Jan 2016 18:40:11 +0000 (18:40 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 6 Jan 2016 18:40:11 +0000 (18:40 +0000)
commitf8ab3ef1eb83f2fdbe54924ba8a46646e3421193
treebd6c1b47a05da8fd608410dc7a402266d29cc779
parent4357b8d66313ed4db22f64b785dbb3ea1df0310a
[ShrinkWrap] Fix FindIDom to only have one kind of failure.

FindIDom() can fail in two different ways - it can either return nullptr or the
block itself, depending on the circumstances. Some users of FindIDom() check
one error condition, while others check the other.

Change it to always return nullptr on failure.
This fixes PR26004.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256955 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ShrinkWrap.cpp
test/CodeGen/X86/shrinkwrap-hang.ll [new file with mode: 0644]