[llvm] [ConstraintElim] Skip rows implied by a single existing row. (PR #227688)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 03:44:37 PDT 2026


================
@@ -2265,6 +2265,11 @@ void ConstraintInfo::addFactImpl(CmpInst::Predicate Pred, Value *A, Value *B,
   LLVM_DEBUG(dbgs() << "Adding '"; dumpUnpackedICmp(dbgs(), Pred, A, B);
              dbgs() << "'\n");
   auto &CSToUse = getCS(R.IsSigned);
+  // A row implied by a single existing row adds no information. Rows in the
+  // system are removed in reverse order, so the existing row outlives R.
+  if (!R.isEq() && NewVariables.empty() &&
+      CSToUse.isImpliedBySingleRow(R.Coefficients))
----------------
fhahn wrote:

Done thanks!

https://github.com/llvm/llvm-project/pull/227688


More information about the llvm-commits mailing list