summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/icmp-logical.ll
Commit message (Collapse)AuthorAgeFilesLines
* InstCombine: Fold away tautological masked comparesDavid Majnemer2014-11-181-0/+20
| | | | | | | | | It is impossible for (x & INT_MAX) == 0 && x == INT_MAX to ever be true. While this sort of reasoning should normally live in InstSimplify, the machinery that derives this result is not trivial to split out. llvm-svn: 222230
* InstCombine: allow unmasked icmps to be combined with logical opsTim Northover2013-09-041-0/+30
| | | | | | | | | | "(icmp op i8 A, B)" is equivalent to "(icmp op i8 (A & 0xff), B)" as a degenerate case. Allowing this as a "masked" comparison when analysing "(icmp) &/| (icmp)" allows us to combine them in more cases. rdar://problem/7625728 llvm-svn: 189931
* InstCombine: look for masked compares with subset relationTim Northover2013-09-041-0/+122
Even in cases which aren't universally optimisable like "(A & B) != 0 && (A & C) != 0", the masks can make one of the comparisons completely redundant. In this case, since we've gone to the effort of spotting masked comparisons we should combine them. rdar://problem/7625728 llvm-svn: 189930
OpenPOWER on IntegriCloud