[PATCH] D151799: [ConstraintElim] Try to use first cmp to prove second cmp for ANDs.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 07:10:26 PDT 2023


nikic accepted this revision.
nikic added a comment.

LGTM



================
Comment at: llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:1010
+                                          unsigned NumIn, unsigned NumOut,
+                                          Instruction *ContextInst) {
   LLVM_DEBUG(dbgs() << "Checking " << *Cmp << "\n");
----------------
Commit this refactoring separately?


================
Comment at: llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:1130
+    else
+      And->setOperand(1, ConstantInt::getFalse(And->getType()));
+    Changed = true;
----------------
Use `ConstantInt::getBool()`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151799



More information about the llvm-commits mailing list