[llvm] 4eba40c - [ConstraintElim] Remove dead code. NFC. (#118983)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 05:20:50 PST 2024


Author: Yingwei Zheng
Date: 2024-12-20T21:20:47+08:00
New Revision: 4eba40c604c75b5c5561ffd6e009dbbb5a4f0b4b

URL: https://github.com/llvm/llvm-project/commit/4eba40c604c75b5c5561ffd6e009dbbb5a4f0b4b
DIFF: https://github.com/llvm/llvm-project/commit/4eba40c604c75b5c5561ffd6e009dbbb5a4f0b4b.diff

LOG: [ConstraintElim] Remove dead code. NFC. (#118983)

`R2` should be always greater than `R1` here because both `R1` and `R2` are not modified inside the loop.

Added: 
    

Modified: 
    llvm/lib/Analysis/ConstraintSystem.cpp

Removed: 
    


################################################################################
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