Teach codegen to handle:
authorChris Lattner <sabre@nondot.org>
Sat, 2 Jan 2010 00:00:03 +0000 (00:00 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 2 Jan 2010 00:00:03 +0000 (00:00 +0000)
commit133ce871df8bc161928970216ff9b195b1fa3a14
tree41664edfae4616e1a6820e6518b13a0a693d0e09
parentaac00392c38a7ce6b66fd8e39ae6bfe67b46dcf9
Teach codegen to handle:
 (X != null) | (Y != null) --> (X|Y) != 0
 (X == null) & (Y == null) --> (X|Y) == 0

so that instcombine can stop doing this for pointers.  This is part of PR3351,
which is a case where instcombine doing this for pointers (inserting ptrtoint)
is pessimizing code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92406 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/X86/brcond.ll