[PATCH] D123374: [InstCombine] Fold (A & 2^C1) + A => A & (2^C1 - 1) iff bit C1 in A is a sign bit (PR21929)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 04:20:45 PDT 2022


nikic added a comment.

Can you please add some explicit tests for the actual pattern being folded? I don't think you're testing the commuted case currently, as well as some of the pre-conditions (like the fact that the and must be a power of two).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123374



More information about the llvm-commits mailing list