[PATCH] D110488: [InstCombine] Canonicalize ((X & -X) - 1) --> (~X & (X - 1)) (PR51784)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 24 06:25:53 PDT 2022


RKSimon updated this revision to Diff 455183.
RKSimon added a comment.

Use m_Add instead of m_c_Add as it'll canonicalise to RHS constant anyway


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110488

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
  llvm/test/Transforms/InstCombine/add-mask-neg.ll
  llvm/test/Transforms/InstCombine/ctpop-cttz.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110488.455183.patch
Type: text/x-patch
Size: 6227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220824/7d8acd66/attachment.bin>


More information about the llvm-commits mailing list