[PATCH] D141753: [InstCombine] Optimize (icmp slt (1 << Y), 1) -> (icmp eq Y, BitWidth-1).

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 14 10:19:46 PST 2023


craig.topper added a comment.

In D141753#4053721 <https://reviews.llvm.org/D141753#4053721>, @spatel wrote:

> It's good cleanup and seems correct, but it can be generalized even more (could make it another patch if you prefer):
> https://alive2.llvm.org/ce/z/3YB2vs
>
> Need more tests like this:
> https://alive2.llvm.org/ce/z/hVNnPJ

I'd prefer to make it another patch. I haven't observed this in the wild. I was looking in the file for something else and just happened to notice the asymmetry. Then I looked at the line coverage report and saw the untested lines.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141753/new/

https://reviews.llvm.org/D141753



More information about the llvm-commits mailing list