[InstCombine] fix matching of or-of-icmps constants (PR32524)
authorSanjay Patel <spatel@rotateright.com>
Mon, 10 Apr 2017 16:55:57 +0000 (16:55 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 10 Apr 2017 16:55:57 +0000 (16:55 +0000)
commit570e35c1570a21d98f8fce9378bfdbc36482968a
tree15599cb0b1001c628c817cabf905bc264733cecd
parent08126372e3363ce8ec27d345dbd6fb518be5f0b4
[InstCombine] fix matching of or-of-icmps constants (PR32524)

Also, make the same change in and-of-icmps and remove a hack for detecting that case.

Finally, add some FIXME comments because the code duplication here is awful.

This should fix the remaining IR problem noted in:
https://bugs.llvm.org/show_bug.cgi?id=32524

llvm-svn: 299851
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/or.ll