[PATCH] D133362: [InstCombine] Fold x + (x | -x) to x & (x - 1)

Marc Auberer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 08:19:40 PDT 2022


marcauberer added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/add_or_sub.ll:83
   %x = mul <4 x i16> %p, %p ; thwart complexity-based canonicalization
   %sub = sub <4 x i16> <i16 -1, i16 poison, i16 poison, i16 -1>, %x
   %or = or <4 x i16> %sub, %x
----------------
spatel wrote:
> Oops - I missed this detail in the pre-commit. Shouldn't the vector constant have zeros rather than -1 to exercise this patch?
Oh yes, you are right! Is a separate change required for this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133362



More information about the llvm-commits mailing list