OSDN Git Service

[InstSimplify] add folds for and-of-icmps with same operands
authorSanjay Patel <spatel@rotateright.com>
Tue, 6 Dec 2016 19:05:46 +0000 (19:05 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 6 Dec 2016 19:05:46 +0000 (19:05 +0000)
commit02d83470abef7b2defbbb1cd3661f8b7cc895473
tree59277a2129cea2c63111d31fec2bddc0a13d6482
parent9c3d059fa2aa3a29b2da0c38703ed03205500fde
[InstSimplify] add folds for and-of-icmps with same operands

All of these (and a few more) are already handled by InstCombine,
but we shouldn't have to wait until then to simplify these because
they're cheap to deal with here in InstSimplify.

This is the 'and' sibling of the earlier 'or' patch:
https://reviews.llvm.org/rL288833

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288841 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/and-icmps-same-ops.ll