Don't use isNullValue to evaluate ConstantExpr
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 6 Dec 2013 21:48:36 +0000 (21:48 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 6 Dec 2013 21:48:36 +0000 (21:48 +0000)
commit42883d0ac4388c12c856225760fe591a361db7bc
treed1b34bcd6a84136d12e6b42efe7c8df97b76dc59
parent92b10e5f858b5554a569007eeaf7a48bad622aea
Don't use isNullValue to evaluate ConstantExpr

ConstantExpr can evaluate to false even when isNullValue gives false.

Fixes PR18143.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196611 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/phi-select-constexpr.ll [new file with mode: 0644]