[PATCH] D109151: [InstCombine] Convert xor (ashr X, BW-1), C -> select(X >=s 0, C, ~C)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 12:25:14 PDT 2021


lebedev.ri added a comment.

In D109151#3046283 <https://reviews.llvm.org/D109151#3046283>, @lebedev.ri wrote:

> FWIW, we don't strictly need this to be xor-by-constant: https://alive2.llvm.org/ce/z/snX3_H

Err, i of course meant https://alive2.llvm.org/ce/z/NJ85qY
... which can also be spelled as: https://alive2.llvm.org/ce/z/FTGTu7
which brings me to the real question: isn't the main pattern here: https://alive2.llvm.org/ce/z/B8TUY6 ?

> If everything is one-use, then we could allow xor-by-value too.
> Not sure if it improves things or not though?




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

https://reviews.llvm.org/D109151



More information about the llvm-commits mailing list