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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 24 06:09:14 PDT 2023


nikic added a comment.

We shouldn't restrict this to just xor, but generally recurse the operand replacement.



================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4289
   transform(I->operands(), NewOps.begin(),
             [&](Value *V) { return V == Op ? RepOp : V; });
 
----------------
This would be the place to recursively call simplifyWithOpReplaced().


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

https://reviews.llvm.org/D153698



More information about the llvm-commits mailing list