diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-03 16:57:07 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-01-03 16:57:07 +0000 |
| commit | 77dbea07356e1ab2f37a777d4d1ddc5dd3e301c2 (patch) | |
| tree | bdb0bc8db7a91e1f8b4bb8729fc391e2adf45380 /llvm/lib/Analysis/ConstraintSystem.cpp | |
| parent | 99aabd70801bd4bc72c4942747f6d62c675112f5 (diff) | |
Diffstat (limited to 'llvm/lib/Analysis/ConstraintSystem.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ConstraintSystem.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/ConstraintSystem.cpp b/llvm/lib/Analysis/ConstraintSystem.cpp index 8a802515b6f4..35bdd869a88d 100644 --- a/llvm/lib/Analysis/ConstraintSystem.cpp +++ b/llvm/lib/Analysis/ConstraintSystem.cpp @@ -29,7 +29,6 @@ bool ConstraintSystem::eliminateUsingFM() { assert(!Constraints.empty() && "should only be called for non-empty constraint systems"); - uint32_t NewGCD = 1; unsigned LastIdx = NumVariables - 1; // First, either remove the variable in place if it is 0 or add the row to @@ -96,24 +95,20 @@ bool ConstraintSystem::eliminateUsingFM() { IdxUpper++; } - if (MulOverflow(UpperV, ((-1) * LowerLast / GCD), M1)) + if (MulOverflow(UpperV, ((-1) * LowerLast), M1)) return false; if (IdxLower < LowerRow.size() && LowerRow[IdxLower].Id == CurrentId) { LowerV = LowerRow[IdxLower].Coefficient; IdxLower++; } - if (MulOverflow(LowerV, (UpperLast / GCD), M2)) + if (MulOverflow(LowerV, (UpperLast), M2)) return false; if (AddOverflow(M1, M2, N)) return false; if (N == 0) continue; NR.emplace_back(N, CurrentId); - - NewGCD = - APIntOps::GreatestCommonDivisor({32, (uint32_t)N}, {32, NewGCD}) - .getZExtValue(); } if (NR.empty()) continue; @@ -124,7 +119,6 @@ bool ConstraintSystem::eliminateUsingFM() { } } NumVariables -= 1; - GCD = NewGCD; return true; } |
