[PATCH] D94861: [InstCombine,InstSimplify] Optimize select followed by and/or/xor

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 18 10:14:02 PST 2021


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:3469
+          Sel->setTrueValue(
+              ConstantExpr::get(Instruction::Xor, cast<Constant>(TV), One));
+        if (CmpF)
----------------
You can use `ConstantExpr::getNot()` instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94861



More information about the llvm-commits mailing list