Fix regression in InstCombine introduced by r278944
authorReid Kleckner <rnk@google.com>
Fri, 19 Aug 2016 16:53:18 +0000 (16:53 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 19 Aug 2016 16:53:18 +0000 (16:53 +0000)
commita871d3872ac55cfab62492e2a1fb7b056d204668
tree88342a495dfac403c4a7d04165a189af3f695ca0
parent9d7ac684a9b1ca0bac19f429417736c4d3635129
Fix regression in InstCombine introduced by r278944

The intended transform is:
  // Simplify icmp eq (or (ptrtoint P), (ptrtoint Q)), 0
  // -> and (icmp eq P, null), (icmp eq Q, null).

P and Q are both pointer types, but may have different types. We need
two calls to getNullValue() to make the icmps.

llvm-svn: 279271
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/icmp.ll