[InstCombine] add tests for icmp gt/lt (shr X, C1), C2; NFC

Surprisingly, we have zero coverage for these patterns.

Many of these are handled in InstSimplify, but it's not obvious
what the rule for folding each case should be, so I've just
stamped out everything.

It should be possible to fold every case, but currently, we
miss these:

int ashr_slt(int x) {
  return (x >> 1) < 1; 
}

int ashr_sgt(int x) {
  return (x >> 1) > 0; 
}

https://godbolt.org/g/aB2hLE

llvm-svn: 314837
This commit is contained in:
Sanjay Patel 2017-10-03 20:34:20 +00:00
parent acc15e1265
commit 389b7cedc3
1 changed files with 1790 additions and 0 deletions

File diff suppressed because it is too large Load Diff