[PATCH] D139299: [Instcombine] Canonicalize xor to or for two logical-select case

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 11:21:35 PST 2022


spatel added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:3484
 //   x ^ (~y)
 static Instruction *sinkNotIntoXor(BinaryOperator &I,
                                    InstCombiner::BuilderTy &Builder) {
----------------
I see that the first match is shared, but this function name and description are not accurate if we add the new fold inside here.

It would be better to create/rename this function as `foldNotXor()` that has the first match, then it calls or includes sinkNotIntoXor() and includes the new code.


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

https://reviews.llvm.org/D139299



More information about the llvm-commits mailing list