[PATCH] D129622: [InstCombine] add fold (X > C - 1) ^ (X < C + 1) --> X != C

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 07:23:28 PDT 2022


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM - I think this could be implemented more generally using ConstantRange, but we already get the inverted pattern because the constants are equal in that case, so handling this specific pattern is ok.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129622



More information about the llvm-commits mailing list