[InstCombine] Fix for assert build failures caused by r218721
authorGerolf Hoflehner <ghoflehner@apple.com>
Wed, 1 Oct 2014 03:24:39 +0000 (03:24 +0000)
committerGerolf Hoflehner <ghoflehner@apple.com>
Wed, 1 Oct 2014 03:24:39 +0000 (03:24 +0000)
commit3adf585efec9dde093c9df36af1012bbe1bf0506
treee702850de3f6717642f913b8c9f5eefa6e3d67b2
parent9e2fe4648453e9926348e394af0570448d0af083
[InstCombine] Fix for assert build failures caused by r218721

The icmp-select-icmp optimization made the implicit assumption
that the select-icmp instructions are in the same block and asserted on it.
The fix explicitly checks for that condition and conservatively suppresses
the optimization when it is violated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218735 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp