[PATCH] D153698: [InstCombine] canonicalize multi xor as cmp+select

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 18:34:13 PDT 2023


Allen marked an inline comment as done.
Allen added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4276
   transform(I->operands(), NewOps.begin(),
             [&](Value *V) { return V == Op ? RepOp : V; });
 
----------------
nikic wrote:
> This isn't what I had in mind. Why can't we do the recursive call in here?
I think there is conflict on the solution.
we need check **!is_contained(I->operands(), Op)** then entry the  recursive call , while in the transform, we can't get all the **operands of I**


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

https://reviews.llvm.org/D153698



More information about the llvm-commits mailing list