Skip to content

Commit 341059d

Browse files
authored
Merge pull request #21437 from igfoo/igfoo/onemk
C++: Small simplification
2 parents 3c3c58b + dbb8bb8 commit 341059d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,7 @@ private module Cached {
16631663
private predicate compares_ge(
16641664
ValueNumber test, Operand left, Operand right, int k, boolean isGe, GuardValue value
16651665
) {
1666-
exists(int onemk | k = 1 - onemk | compares_lt(test, right, left, onemk, isGe, value))
1666+
compares_lt(test, right, left, 1 - k, isGe, value)
16671667
}
16681668

16691669
/** Rearrange various simple comparisons into `left < right + k` form. */

0 commit comments

Comments
 (0)