[PATCH] D108992: [KnownBits] Add support for X+X and X*X self-addition/multiplication

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 02:34:59 PDT 2021


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

Clean up the selfadd cases to just perform a shl-by-one.

InstCombine does canonicalize X+X to X<<1, but we have cases in DAG where this is reversed - such as the cases being addressed in PR50468/D108139 <https://reviews.llvm.org/D108139> etc.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108992

Files:
  llvm/include/llvm/Support/KnownBits.h
  llvm/lib/Support/KnownBits.cpp
  llvm/unittests/Support/KnownBitsTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108992.369890.patch
Type: text/x-patch
Size: 5347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210901/a9694344/attachment.bin>


More information about the llvm-commits mailing list