[llvm] [ConstraintElim] Remove dead code. NFC. (PR #118983)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 07:11:53 PST 2024


https://github.com/dtcxzyw created https://github.com/llvm/llvm-project/pull/118983

`R2` should be always greater than `R1` here.
Code coverage: https://dtcxzyw.github.io/llvm-opt-benchmark/coverage/data/zyw/opt-ci/actions-runner/_work/llvm-opt-benchmark/llvm-opt-benchmark/llvm/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp.html#L56


>From 33baddc9188accf4d83c776e03653a3ecb947874 Mon Sep 17 00:00:00 2001
From: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: Fri, 6 Dec 2024 23:07:55 +0800
Subject: [PATCH] [ConstraintElim] Remove dead code. NFC.

---
 llvm/lib/Analysis/ConstraintSystem.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/llvm/lib/Analysis/ConstraintSystem.cpp b/llvm/lib/Analysis/ConstraintSystem.cpp
index e4c9dcc7544e99..7216a0219080f4 100644
--- a/llvm/lib/Analysis/ConstraintSystem.cpp
+++ b/llvm/lib/Analysis/ConstraintSystem.cpp
@@ -52,9 +52,6 @@ bool ConstraintSystem::eliminateUsingFM() {
   for (unsigned R1 = 0; R1 < NumRemainingConstraints; R1++) {
     // FIXME do not use copy
     for (unsigned R2 = R1 + 1; R2 < NumRemainingConstraints; R2++) {
-      if (R1 == R2)
-        continue;
-
       int64_t UpperLast = getLastCoefficient(RemainingRows[R2], LastIdx);
       int64_t LowerLast = getLastCoefficient(RemainingRows[R1], LastIdx);
       assert(



More information about the llvm-commits mailing list