about summary refs log tree commit diff
path: root/tests/coverage/mcdc
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-12-05 18:57:17 +1100
committerZalathar <Zalathar@users.noreply.github.com>2024-12-07 12:13:12 +1100
commitac815ff6b0c8f0fd68ddf666ea1f96e362c65300 (patch)
tree10b193d9039fdc85187752bab628e9da5d13c991 /tests/coverage/mcdc
parent8dc83770f748c6cd16b342889ca2240397c19534 (diff)
downloadrust-ac815ff6b0c8f0fd68ddf666ea1f96e362c65300.tar.gz
rust-ac815ff6b0c8f0fd68ddf666ea1f96e362c65300.zip
coverage: Prefer to visit nodes whose predecessors have been visited
Diffstat (limited to 'tests/coverage/mcdc')
-rw-r--r--tests/coverage/mcdc/condition-limit.cov-map112
-rw-r--r--tests/coverage/mcdc/if.cov-map203
-rw-r--r--tests/coverage/mcdc/inlined_expressions.cov-map17
-rw-r--r--tests/coverage/mcdc/nested_if.cov-map88
-rw-r--r--tests/coverage/mcdc/non_control_flow.cov-map207
5 files changed, 252 insertions, 375 deletions
diff --git a/tests/coverage/mcdc/condition-limit.cov-map b/tests/coverage/mcdc/condition-limit.cov-map
index 19716878600..8ff5d6360f6 100644
--- a/tests/coverage/mcdc/condition-limit.cov-map
+++ b/tests/coverage/mcdc/condition-limit.cov-map
@@ -1,54 +1,16 @@
 Function name: condition_limit::accept_7_conditions
-Raw bytes (237): 0x[01, 01, 2e, 01, 05, 05, 09, 05, 09, 05, 7b, 09, 0d, 05, 7b, 09, 0d, 05, 77, 7b, 11, 09, 0d, 05, 77, 7b, 11, 09, 0d, 05, 73, 77, 15, 7b, 11, 09, 0d, 05, 73, 77, 15, 7b, 11, 09, 0d, 05, 6f, 73, 19, 77, 15, 7b, 11, 09, 0d, 05, 6f, 73, 19, 77, 15, 7b, 11, 09, 0d, 83, 01, 05, a7, 01, 21, ab, 01, 19, af, 01, 15, b3, 01, 11, b7, 01, 0d, 01, 09, 9f, 01, 05, a3, 01, 21, a7, 01, 1d, ab, 01, 19, af, 01, 15, b3, 01, 11, b7, 01, 0d, 01, 09, 12, 01, 07, 01, 02, 09, 28, 08, 07, 02, 08, 00, 27, 30, 05, 02, 01, 07, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 0a, 09, 07, 06, 00, 00, 0d, 00, 0e, 0a, 00, 12, 00, 13, 30, 16, 0d, 06, 05, 00, 00, 12, 00, 13, 16, 00, 17, 00, 18, 30, 2a, 11, 05, 04, 00, 00, 17, 00, 18, 2a, 00, 1c, 00, 1d, 30, 46, 15, 04, 03, 00, 00, 1c, 00, 1d, 46, 00, 21, 00, 22, 30, 6a, 19, 03, 02, 00, 00, 21, 00, 22, 6a, 00, 26, 00, 27, 30, 1d, 21, 02, 00, 00, 00, 26, 00, 27, 1d, 00, 28, 02, 06, 7e, 02, 05, 00, 06, 9a, 01, 01, 01, 00, 02]
+Raw bytes (147): 0x[01, 01, 08, 01, 05, 05, 09, 09, 0d, 0d, 11, 11, 15, 15, 19, 19, 1d, 01, 1d, 12, 01, 07, 01, 02, 09, 28, 08, 07, 02, 08, 00, 27, 30, 05, 02, 01, 07, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 07, 06, 00, 00, 0d, 00, 0e, 09, 00, 12, 00, 13, 30, 0d, 0a, 06, 05, 00, 00, 12, 00, 13, 0d, 00, 17, 00, 18, 30, 11, 0e, 05, 04, 00, 00, 17, 00, 18, 11, 00, 1c, 00, 1d, 30, 15, 12, 04, 03, 00, 00, 1c, 00, 1d, 15, 00, 21, 00, 22, 30, 19, 16, 03, 02, 00, 00, 21, 00, 22, 19, 00, 26, 00, 27, 30, 1d, 1a, 02, 00, 00, 00, 26, 00, 27, 1d, 00, 28, 02, 06, 1e, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 46
+Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Expression(30, Add)
-- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(1), rhs = Expression(30, Add)
-- expression 6 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 7 operands: lhs = Counter(1), rhs = Expression(29, Add)
-- expression 8 operands: lhs = Expression(30, Add), rhs = Counter(4)
-- expression 9 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 10 operands: lhs = Counter(1), rhs = Expression(29, Add)
-- expression 11 operands: lhs = Expression(30, Add), rhs = Counter(4)
-- expression 12 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 13 operands: lhs = Counter(1), rhs = Expression(28, Add)
-- expression 14 operands: lhs = Expression(29, Add), rhs = Counter(5)
-- expression 15 operands: lhs = Expression(30, Add), rhs = Counter(4)
-- expression 16 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 17 operands: lhs = Counter(1), rhs = Expression(28, Add)
-- expression 18 operands: lhs = Expression(29, Add), rhs = Counter(5)
-- expression 19 operands: lhs = Expression(30, Add), rhs = Counter(4)
-- expression 20 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 21 operands: lhs = Counter(1), rhs = Expression(27, Add)
-- expression 22 operands: lhs = Expression(28, Add), rhs = Counter(6)
-- expression 23 operands: lhs = Expression(29, Add), rhs = Counter(5)
-- expression 24 operands: lhs = Expression(30, Add), rhs = Counter(4)
-- expression 25 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 26 operands: lhs = Counter(1), rhs = Expression(27, Add)
-- expression 27 operands: lhs = Expression(28, Add), rhs = Counter(6)
-- expression 28 operands: lhs = Expression(29, Add), rhs = Counter(5)
-- expression 29 operands: lhs = Expression(30, Add), rhs = Counter(4)
-- expression 30 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 31 operands: lhs = Expression(32, Add), rhs = Counter(1)
-- expression 32 operands: lhs = Expression(41, Add), rhs = Counter(8)
-- expression 33 operands: lhs = Expression(42, Add), rhs = Counter(6)
-- expression 34 operands: lhs = Expression(43, Add), rhs = Counter(5)
-- expression 35 operands: lhs = Expression(44, Add), rhs = Counter(4)
-- expression 36 operands: lhs = Expression(45, Add), rhs = Counter(3)
-- expression 37 operands: lhs = Counter(0), rhs = Counter(2)
-- expression 38 operands: lhs = Expression(39, Add), rhs = Counter(1)
-- expression 39 operands: lhs = Expression(40, Add), rhs = Counter(8)
-- expression 40 operands: lhs = Expression(41, Add), rhs = Counter(7)
-- expression 41 operands: lhs = Expression(42, Add), rhs = Counter(6)
-- expression 42 operands: lhs = Expression(43, Add), rhs = Counter(5)
-- expression 43 operands: lhs = Expression(44, Add), rhs = Counter(4)
-- expression 44 operands: lhs = Expression(45, Add), rhs = Counter(3)
-- expression 45 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 5 operands: lhs = Counter(5), rhs = Counter(6)
+- expression 6 operands: lhs = Counter(6), rhs = Counter(7)
+- expression 7 operands: lhs = Counter(0), rhs = Counter(7)
 Number of file 0 mappings: 18
 - Code(Counter(0)) at (prev + 7, 1) to (start + 2, 9)
 - MCDCDecision { bitmap_idx: 8, conditions_num: 7 } at (prev + 2, 8) to (start + 0, 39)
@@ -56,38 +18,32 @@ Number of file 0 mappings: 18
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Expression(2, Sub), false: Counter(2), condition_id: 7, true_next_id: 6, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
-    true  = (c1 - c2)
-    false = c2
-- Code(Expression(2, Sub)) at (prev + 0, 18) to (start + 0, 19)
-    = (c1 - c2)
-- MCDCBranch { true: Expression(5, Sub), false: Counter(3), condition_id: 6, true_next_id: 5, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
-    true  = (c1 - (c2 + c3))
-    false = c3
-- Code(Expression(5, Sub)) at (prev + 0, 23) to (start + 0, 24)
-    = (c1 - (c2 + c3))
-- MCDCBranch { true: Expression(10, Sub), false: Counter(4), condition_id: 5, true_next_id: 4, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
-    true  = (c1 - ((c2 + c3) + c4))
-    false = c4
-- Code(Expression(10, Sub)) at (prev + 0, 28) to (start + 0, 29)
-    = (c1 - ((c2 + c3) + c4))
-- MCDCBranch { true: Expression(17, Sub), false: Counter(5), condition_id: 4, true_next_id: 3, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
-    true  = (c1 - (((c2 + c3) + c4) + c5))
-    false = c5
-- Code(Expression(17, Sub)) at (prev + 0, 33) to (start + 0, 34)
-    = (c1 - (((c2 + c3) + c4) + c5))
-- MCDCBranch { true: Expression(26, Sub), false: Counter(6), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
-    true  = (c1 - ((((c2 + c3) + c4) + c5) + c6))
-    false = c6
-- Code(Expression(26, Sub)) at (prev + 0, 38) to (start + 0, 39)
-    = (c1 - ((((c2 + c3) + c4) + c5) + c6))
-- MCDCBranch { true: Counter(7), false: Counter(8), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 38) to (start + 0, 39)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 7, true_next_id: 6, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+    true  = c2
+    false = (c1 - c2)
+- Code(Counter(2)) at (prev + 0, 18) to (start + 0, 19)
+- MCDCBranch { true: Counter(3), false: Expression(2, Sub), condition_id: 6, true_next_id: 5, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
+    true  = c3
+    false = (c2 - c3)
+- Code(Counter(3)) at (prev + 0, 23) to (start + 0, 24)
+- MCDCBranch { true: Counter(4), false: Expression(3, Sub), condition_id: 5, true_next_id: 4, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
+    true  = c4
+    false = (c3 - c4)
+- Code(Counter(4)) at (prev + 0, 28) to (start + 0, 29)
+- MCDCBranch { true: Counter(5), false: Expression(4, Sub), condition_id: 4, true_next_id: 3, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
+    true  = c5
+    false = (c4 - c5)
+- Code(Counter(5)) at (prev + 0, 33) to (start + 0, 34)
+- MCDCBranch { true: Counter(6), false: Expression(5, Sub), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
+    true  = c6
+    false = (c5 - c6)
+- Code(Counter(6)) at (prev + 0, 38) to (start + 0, 39)
+- MCDCBranch { true: Counter(7), false: Expression(6, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 38) to (start + 0, 39)
     true  = c7
-    false = c8
+    false = (c6 - c7)
 - Code(Counter(7)) at (prev + 0, 40) to (start + 2, 6)
-- Code(Expression(31, Sub)) at (prev + 2, 5) to (start + 0, 6)
-    = (((((((c0 + c2) + c3) + c4) + c5) + c6) + c8) - c1)
-- Code(Expression(38, Sub)) at (prev + 1, 1) to (start + 0, 2)
-    = ((((((((c0 + c2) + c3) + c4) + c5) + c6) + c7) + c8) - c1)
-Highest counter ID seen: c8
+- Code(Expression(7, Sub)) at (prev + 2, 5) to (start + 0, 6)
+    = (c0 - c7)
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
+Highest counter ID seen: c7
 
diff --git a/tests/coverage/mcdc/if.cov-map b/tests/coverage/mcdc/if.cov-map
index acb8aac63de..771351f649f 100644
--- a/tests/coverage/mcdc/if.cov-map
+++ b/tests/coverage/mcdc/if.cov-map
@@ -1,14 +1,11 @@
 Function name: if::mcdc_check_a
-Raw bytes (68): 0x[01, 01, 06, 01, 05, 0b, 05, 01, 0d, 13, 05, 17, 0d, 01, 09, 08, 01, 0f, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 0d, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 06, 02, 0c, 02, 06, 0e, 03, 01, 00, 02]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 0f, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
-- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(1)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 15, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -16,27 +13,23 @@ Number of file 0 mappings: 8
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
-    false = c3
+    false = (c1 - c2)
 - Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = ((c0 + c3) - c1)
-- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c2)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: if::mcdc_check_b
-Raw bytes (68): 0x[01, 01, 06, 01, 05, 0b, 05, 01, 0d, 13, 05, 17, 0d, 01, 09, 08, 01, 17, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 0d, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 06, 02, 0c, 02, 06, 0e, 03, 01, 00, 02]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 17, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
-- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(1)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 23, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -44,27 +37,23 @@ Number of file 0 mappings: 8
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
-    false = c3
+    false = (c1 - c2)
 - Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = ((c0 + c3) - c1)
-- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c2)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: if::mcdc_check_both
-Raw bytes (68): 0x[01, 01, 06, 01, 05, 0b, 05, 01, 0d, 13, 05, 17, 0d, 01, 09, 08, 01, 1f, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 0d, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 06, 02, 0c, 02, 06, 0e, 03, 01, 00, 02]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 1f, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
-- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(1)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 31, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -72,27 +61,23 @@ Number of file 0 mappings: 8
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
-    false = c3
+    false = (c1 - c2)
 - Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = ((c0 + c3) - c1)
-- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c2)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: if::mcdc_check_neither
-Raw bytes (68): 0x[01, 01, 06, 01, 05, 0b, 05, 01, 0d, 13, 05, 17, 0d, 01, 09, 08, 01, 07, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 0d, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 06, 02, 0c, 02, 06, 0e, 03, 01, 00, 02]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 07, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 6
+Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(3)
-- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(1)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 7, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -100,32 +85,27 @@ Number of file 0 mappings: 8
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 13) to (start + 0, 14)
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
-    false = c3
+    false = (c1 - c2)
 - Code(Counter(2)) at (prev + 0, 15) to (start + 2, 6)
-- Code(Expression(1, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = ((c0 + c3) - c1)
-- Code(Expression(3, Sub)) at (prev + 3, 1) to (start + 0, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+- Code(Expression(2, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c2)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: if::mcdc_check_not_tree_decision
-Raw bytes (93): 0x[01, 01, 0b, 01, 05, 01, 2b, 05, 09, 05, 09, 17, 2b, 01, 11, 05, 09, 23, 2b, 27, 11, 01, 0d, 05, 09, 0a, 01, 31, 01, 03, 0a, 28, 05, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 03, 00, 09, 00, 0a, 02, 00, 0e, 00, 0f, 30, 09, 06, 03, 02, 00, 00, 0e, 00, 0f, 2b, 00, 14, 00, 15, 30, 0d, 11, 02, 00, 00, 00, 14, 00, 15, 0d, 00, 16, 02, 06, 12, 02, 0c, 02, 06, 1e, 03, 01, 00, 02]
+Raw bytes (85): 0x[01, 01, 07, 01, 05, 01, 17, 05, 09, 05, 09, 17, 0d, 05, 09, 01, 0d, 0a, 01, 31, 01, 03, 0a, 28, 05, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 03, 00, 09, 00, 0a, 02, 00, 0e, 00, 0f, 30, 09, 06, 03, 02, 00, 00, 0e, 00, 0f, 17, 00, 14, 00, 15, 30, 0d, 12, 02, 00, 00, 00, 14, 00, 15, 0d, 00, 16, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 11
+Number of expressions: 7
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Expression(10, Add)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(5, Add)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Expression(10, Add)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(4)
-- expression 6 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 7 operands: lhs = Expression(8, Add), rhs = Expression(10, Add)
-- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(4)
-- expression 9 operands: lhs = Counter(0), rhs = Counter(3)
-- expression 10 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 6 operands: lhs = Counter(0), rhs = Counter(3)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 49, 1) to (start + 3, 10)
 - MCDCDecision { bitmap_idx: 5, conditions_num: 3 } at (prev + 3, 8) to (start + 0, 21)
@@ -137,33 +117,30 @@ Number of file 0 mappings: 10
 - MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 3, true_next_id: 2, false_next_id: 0 } at (prev + 0, 14) to (start + 0, 15)
     true  = c2
     false = (c0 - (c1 + c2))
-- Code(Expression(10, Add)) at (prev + 0, 20) to (start + 0, 21)
+- Code(Expression(5, Add)) at (prev + 0, 20) to (start + 0, 21)
     = (c1 + c2)
-- MCDCBranch { true: Counter(3), false: Counter(4), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 20) to (start + 0, 21)
+- MCDCBranch { true: Counter(3), false: Expression(4, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 20) to (start + 0, 21)
     true  = c3
-    false = c4
+    false = ((c1 + c2) - c3)
 - Code(Counter(3)) at (prev + 0, 22) to (start + 2, 6)
-- Code(Expression(4, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = ((c0 + c4) - (c1 + c2))
-- Code(Expression(7, Sub)) at (prev + 3, 1) to (start + 0, 2)
-    = (((c0 + c3) + c4) - (c1 + c2))
-Highest counter ID seen: c4
+- Code(Expression(6, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - c3)
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c3
 
 Function name: if::mcdc_check_tree_decision
-Raw bytes (91): 0x[01, 01, 0a, 01, 05, 05, 09, 05, 09, 09, 0d, 17, 05, 01, 11, 1f, 05, 23, 11, 27, 0d, 01, 09, 0a, 01, 27, 01, 03, 09, 28, 04, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0e, 00, 0f, 30, 09, 0a, 02, 00, 03, 00, 0e, 00, 0f, 0a, 00, 13, 00, 14, 30, 0d, 11, 03, 00, 00, 00, 13, 00, 14, 0f, 00, 16, 02, 06, 12, 02, 0c, 02, 06, 1a, 03, 01, 00, 02]
+Raw bytes (87): 0x[01, 01, 08, 01, 05, 05, 09, 05, 09, 05, 1f, 09, 0d, 09, 0d, 01, 1f, 09, 0d, 0a, 01, 27, 01, 03, 09, 28, 04, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0e, 00, 0f, 30, 09, 0a, 02, 00, 03, 00, 0e, 00, 0f, 0a, 00, 13, 00, 14, 30, 0d, 0e, 03, 00, 00, 00, 13, 00, 14, 1f, 00, 16, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 10
+Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(1)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(4)
-- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(1)
-- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(4)
-- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(3)
-- expression 9 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(1), rhs = Expression(7, Add)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 5 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 6 operands: lhs = Counter(0), rhs = Expression(7, Add)
+- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 39, 1) to (start + 3, 9)
 - MCDCDecision { bitmap_idx: 4, conditions_num: 3 } at (prev + 3, 8) to (start + 0, 21)
@@ -176,38 +153,32 @@ Number of file 0 mappings: 10
     false = (c1 - c2)
 - Code(Expression(2, Sub)) at (prev + 0, 19) to (start + 0, 20)
     = (c1 - c2)
-- MCDCBranch { true: Counter(3), false: Counter(4), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
+- MCDCBranch { true: Counter(3), false: Expression(3, Sub), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
     true  = c3
-    false = c4
-- Code(Expression(3, Add)) at (prev + 0, 22) to (start + 2, 6)
+    false = (c1 - (c2 + c3))
+- Code(Expression(7, Add)) at (prev + 0, 22) to (start + 2, 6)
     = (c2 + c3)
-- Code(Expression(4, Sub)) at (prev + 2, 12) to (start + 2, 6)
-    = ((c0 + c4) - c1)
-- Code(Expression(6, Sub)) at (prev + 3, 1) to (start + 0, 2)
-    = ((((c0 + c2) + c3) + c4) - c1)
-Highest counter ID seen: c4
+- Code(Expression(6, Sub)) at (prev + 2, 12) to (start + 2, 6)
+    = (c0 - (c2 + c3))
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c3
 
 Function name: if::mcdc_nested_if
-Raw bytes (130): 0x[01, 01, 10, 01, 05, 01, 3f, 05, 09, 05, 09, 3f, 0d, 05, 09, 3f, 0d, 05, 09, 0d, 15, 01, 3f, 05, 09, 33, 3f, 37, 15, 3b, 11, 01, 0d, 05, 09, 0e, 01, 3b, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 26, 02, 00, 00, 00, 0d, 00, 0e, 3f, 01, 09, 01, 0d, 28, 06, 02, 01, 0c, 00, 12, 30, 1a, 0d, 01, 02, 00, 00, 0c, 00, 0d, 1a, 00, 11, 00, 12, 30, 11, 15, 02, 00, 00, 00, 11, 00, 12, 11, 00, 13, 02, 0a, 23, 02, 09, 00, 0a, 26, 01, 0c, 02, 06, 2e, 03, 01, 00, 02]
+Raw bytes (120): 0x[01, 01, 0b, 01, 05, 01, 2b, 05, 09, 05, 09, 2b, 0d, 05, 09, 0d, 11, 2b, 11, 05, 09, 01, 2b, 05, 09, 0e, 01, 3b, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 26, 02, 00, 00, 00, 0d, 00, 0e, 2b, 01, 09, 01, 0d, 28, 06, 02, 01, 0c, 00, 12, 30, 0d, 12, 01, 02, 00, 00, 0c, 00, 0d, 0d, 00, 11, 00, 12, 30, 11, 1a, 02, 00, 00, 00, 11, 00, 12, 11, 00, 13, 02, 0a, 1e, 02, 09, 00, 0a, 26, 01, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 16
+Number of expressions: 11
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(0), rhs = Expression(15, Add)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(10, Add)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Expression(15, Add), rhs = Counter(3)
+- expression 4 operands: lhs = Expression(10, Add), rhs = Counter(3)
 - expression 5 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 6 operands: lhs = Expression(15, Add), rhs = Counter(3)
-- expression 7 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 8 operands: lhs = Counter(3), rhs = Counter(5)
-- expression 9 operands: lhs = Counter(0), rhs = Expression(15, Add)
+- expression 6 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 7 operands: lhs = Expression(10, Add), rhs = Counter(4)
+- expression 8 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 9 operands: lhs = Counter(0), rhs = Expression(10, Add)
 - expression 10 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 11 operands: lhs = Expression(12, Add), rhs = Expression(15, Add)
-- expression 12 operands: lhs = Expression(13, Add), rhs = Counter(5)
-- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(4)
-- expression 14 operands: lhs = Counter(0), rhs = Counter(3)
-- expression 15 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 14
 - Code(Counter(0)) at (prev + 59, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 14)
@@ -219,23 +190,21 @@ Number of file 0 mappings: 14
 - MCDCBranch { true: Counter(2), false: Expression(9, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c2
     false = (c0 - (c1 + c2))
-- Code(Expression(15, Add)) at (prev + 1, 9) to (start + 1, 13)
+- Code(Expression(10, Add)) at (prev + 1, 9) to (start + 1, 13)
     = (c1 + c2)
 - MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 1, 12) to (start + 0, 18)
-- MCDCBranch { true: Expression(6, Sub), false: Counter(3), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 12) to (start + 0, 13)
-    true  = ((c1 + c2) - c3)
-    false = c3
-- Code(Expression(6, Sub)) at (prev + 0, 17) to (start + 0, 18)
-    = ((c1 + c2) - c3)
-- MCDCBranch { true: Counter(4), false: Counter(5), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 17) to (start + 0, 18)
+- MCDCBranch { true: Counter(3), false: Expression(4, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 12) to (start + 0, 13)
+    true  = c3
+    false = ((c1 + c2) - c3)
+- Code(Counter(3)) at (prev + 0, 17) to (start + 0, 18)
+- MCDCBranch { true: Counter(4), false: Expression(6, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 17) to (start + 0, 18)
     true  = c4
-    false = c5
+    false = (c3 - c4)
 - Code(Counter(4)) at (prev + 0, 19) to (start + 2, 10)
-- Code(Expression(8, Add)) at (prev + 2, 9) to (start + 0, 10)
-    = (c3 + c5)
+- Code(Expression(7, Sub)) at (prev + 2, 9) to (start + 0, 10)
+    = ((c1 + c2) - c4)
 - Code(Expression(9, Sub)) at (prev + 1, 12) to (start + 2, 6)
     = (c0 - (c1 + c2))
-- Code(Expression(11, Sub)) at (prev + 3, 1) to (start + 0, 2)
-    = ((((c0 + c3) + c4) + c5) - (c1 + c2))
-Highest counter ID seen: c5
+- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
+Highest counter ID seen: c4
 
diff --git a/tests/coverage/mcdc/inlined_expressions.cov-map b/tests/coverage/mcdc/inlined_expressions.cov-map
index 92ec60dc23c..6a112b66e88 100644
--- a/tests/coverage/mcdc/inlined_expressions.cov-map
+++ b/tests/coverage/mcdc/inlined_expressions.cov-map
@@ -1,12 +1,10 @@
 Function name: inlined_expressions::inlined_instance
-Raw bytes (54): 0x[01, 01, 04, 01, 05, 0b, 05, 0f, 0d, 01, 09, 06, 01, 08, 01, 01, 06, 28, 03, 02, 01, 05, 00, 0b, 30, 05, 02, 01, 02, 00, 00, 05, 00, 06, 05, 00, 0a, 00, 0b, 30, 09, 0d, 02, 00, 00, 00, 0a, 00, 0b, 06, 01, 01, 00, 02]
+Raw bytes (50): 0x[01, 01, 02, 01, 05, 05, 09, 06, 01, 08, 01, 01, 06, 28, 03, 02, 01, 05, 00, 0b, 30, 05, 02, 01, 02, 00, 00, 05, 00, 06, 05, 00, 0a, 00, 0b, 30, 09, 06, 02, 00, 00, 00, 0a, 00, 0b, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
-- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 6
 - Code(Counter(0)) at (prev + 8, 1) to (start + 1, 6)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 5) to (start + 0, 11)
@@ -14,10 +12,9 @@ Number of file 0 mappings: 6
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 10) to (start + 0, 11)
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 10) to (start + 0, 11)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 10) to (start + 0, 11)
     true  = c2
-    false = c3
-- Code(Expression(1, Sub)) at (prev + 1, 1) to (start + 0, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+    false = (c1 - c2)
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
diff --git a/tests/coverage/mcdc/nested_if.cov-map b/tests/coverage/mcdc/nested_if.cov-map
index 72daecabc77..72c7d68840d 100644
--- a/tests/coverage/mcdc/nested_if.cov-map
+++ b/tests/coverage/mcdc/nested_if.cov-map
@@ -1,24 +1,22 @@
 Function name: nested_if::doubly_nested_if_in_condition
-Raw bytes (172): 0x[01, 01, 10, 01, 05, 05, 09, 05, 09, 05, 27, 09, 19, 19, 1d, 19, 1d, 23, 27, 05, 1d, 09, 19, 09, 0d, 33, 05, 01, 15, 3b, 05, 3f, 15, 01, 11, 14, 01, 0f, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 11, 15, 02, 00, 00, 00, 0d, 00, 4e, 05, 00, 10, 00, 11, 28, 06, 02, 00, 10, 00, 36, 30, 09, 0a, 01, 00, 02, 00, 10, 00, 11, 30, 0d, 21, 02, 00, 00, 00, 15, 00, 36, 0a, 00, 18, 00, 19, 28, 03, 02, 00, 18, 00, 1e, 30, 19, 0e, 01, 02, 00, 00, 18, 00, 19, 19, 00, 1d, 00, 1e, 30, 1a, 1d, 02, 00, 00, 00, 1d, 00, 1e, 1a, 00, 21, 00, 25, 1e, 00, 2f, 00, 34, 2b, 00, 39, 00, 3e, 21, 00, 48, 00, 4c, 11, 00, 4f, 02, 06, 2e, 02, 0c, 02, 06, 36, 03, 01, 00, 02]
+Raw bytes (168): 0x[01, 01, 0e, 01, 05, 05, 09, 05, 09, 05, 13, 09, 19, 19, 1d, 05, 1f, 09, 1d, 09, 0d, 2b, 05, 01, 15, 33, 05, 37, 15, 01, 11, 14, 01, 0f, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 11, 15, 02, 00, 00, 00, 0d, 00, 4e, 05, 00, 10, 00, 11, 28, 06, 02, 00, 10, 00, 36, 30, 09, 0a, 01, 00, 02, 00, 10, 00, 11, 30, 0d, 21, 02, 00, 00, 00, 15, 00, 36, 0a, 00, 18, 00, 19, 28, 03, 02, 00, 18, 00, 1e, 30, 19, 0e, 01, 02, 00, 00, 18, 00, 19, 19, 00, 1d, 00, 1e, 30, 1d, 16, 02, 00, 00, 00, 1d, 00, 1e, 1d, 00, 21, 00, 25, 1a, 00, 2f, 00, 34, 23, 00, 39, 00, 3e, 21, 00, 48, 00, 4c, 11, 00, 4f, 02, 06, 26, 02, 0c, 02, 06, 2e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 16
+Number of expressions: 14
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Expression(9, Add)
+- expression 3 operands: lhs = Counter(1), rhs = Expression(4, Add)
 - expression 4 operands: lhs = Counter(2), rhs = Counter(6)
 - expression 5 operands: lhs = Counter(6), rhs = Counter(7)
-- expression 6 operands: lhs = Counter(6), rhs = Counter(7)
-- expression 7 operands: lhs = Expression(8, Add), rhs = Expression(9, Add)
-- expression 8 operands: lhs = Counter(1), rhs = Counter(7)
-- expression 9 operands: lhs = Counter(2), rhs = Counter(6)
-- expression 10 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 6 operands: lhs = Counter(1), rhs = Expression(7, Add)
+- expression 7 operands: lhs = Counter(2), rhs = Counter(7)
+- expression 8 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 9 operands: lhs = Expression(10, Add), rhs = Counter(1)
+- expression 10 operands: lhs = Counter(0), rhs = Counter(5)
 - expression 11 operands: lhs = Expression(12, Add), rhs = Counter(1)
-- expression 12 operands: lhs = Counter(0), rhs = Counter(5)
-- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(1)
-- expression 14 operands: lhs = Expression(15, Add), rhs = Counter(5)
-- expression 15 operands: lhs = Counter(0), rhs = Counter(4)
+- expression 12 operands: lhs = Expression(13, Add), rhs = Counter(5)
+- expression 13 operands: lhs = Counter(0), rhs = Counter(4)
 Number of file 0 mappings: 20
 - Code(Counter(0)) at (prev + 15, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 9, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 78)
@@ -43,20 +41,19 @@ Number of file 0 mappings: 20
     true  = c6
     false = (c1 - (c2 + c6))
 - Code(Counter(6)) at (prev + 0, 29) to (start + 0, 30)
-- MCDCBranch { true: Expression(6, Sub), false: Counter(7), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 29) to (start + 0, 30)
-    true  = (c6 - c7)
-    false = c7
-- Code(Expression(6, Sub)) at (prev + 0, 33) to (start + 0, 37)
-    = (c6 - c7)
-- Code(Expression(7, Sub)) at (prev + 0, 47) to (start + 0, 52)
-    = ((c1 + c7) - (c2 + c6))
-- Code(Expression(10, Add)) at (prev + 0, 57) to (start + 0, 62)
+- MCDCBranch { true: Counter(7), false: Expression(5, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 29) to (start + 0, 30)
+    true  = c7
+    false = (c6 - c7)
+- Code(Counter(7)) at (prev + 0, 33) to (start + 0, 37)
+- Code(Expression(6, Sub)) at (prev + 0, 47) to (start + 0, 52)
+    = (c1 - (c2 + c7))
+- Code(Expression(8, Add)) at (prev + 0, 57) to (start + 0, 62)
     = (c2 + c3)
 - Code(Counter(8)) at (prev + 0, 72) to (start + 0, 76)
 - Code(Counter(4)) at (prev + 0, 79) to (start + 2, 6)
-- Code(Expression(11, Sub)) at (prev + 2, 12) to (start + 2, 6)
+- Code(Expression(9, Sub)) at (prev + 2, 12) to (start + 2, 6)
     = ((c0 + c5) - c1)
-- Code(Expression(13, Sub)) at (prev + 3, 1) to (start + 0, 2)
+- Code(Expression(11, Sub)) at (prev + 3, 1) to (start + 0, 2)
     = (((c0 + c4) + c5) - c1)
 Highest counter ID seen: c8
 
@@ -109,30 +106,28 @@ Number of file 0 mappings: 14
 Highest counter ID seen: c5
 
 Function name: nested_if::nested_in_then_block_in_condition
-Raw bytes (180): 0x[01, 01, 14, 01, 05, 05, 09, 05, 09, 05, 3b, 09, 0d, 09, 0d, 3b, 11, 09, 0d, 11, 15, 11, 15, 2f, 11, 3b, 15, 09, 0d, 05, 3b, 09, 0d, 43, 05, 01, 1d, 4b, 05, 4f, 1d, 01, 19, 14, 01, 22, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4b, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 19, 1d, 02, 00, 00, 00, 0d, 00, 4b, 05, 00, 10, 00, 11, 28, 03, 02, 00, 10, 00, 16, 30, 09, 0a, 01, 00, 02, 00, 10, 00, 11, 0a, 00, 15, 00, 16, 30, 0d, 36, 02, 00, 00, 00, 15, 00, 16, 3b, 00, 1c, 00, 1d, 28, 06, 02, 00, 1c, 00, 22, 30, 11, 1a, 01, 02, 00, 00, 1c, 00, 1d, 11, 00, 21, 00, 22, 30, 26, 15, 02, 00, 00, 00, 21, 00, 22, 26, 00, 25, 00, 29, 2a, 00, 33, 00, 38, 36, 00, 44, 00, 49, 19, 00, 4c, 02, 06, 3e, 02, 0c, 02, 06, 46, 03, 01, 00, 02]
+Raw bytes (176): 0x[01, 01, 12, 01, 05, 05, 09, 05, 09, 05, 33, 09, 0d, 09, 0d, 33, 11, 09, 0d, 11, 15, 33, 15, 09, 0d, 05, 33, 09, 0d, 3b, 05, 01, 1d, 43, 05, 47, 1d, 01, 19, 14, 01, 22, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4b, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 19, 1d, 02, 00, 00, 00, 0d, 00, 4b, 05, 00, 10, 00, 11, 28, 03, 02, 00, 10, 00, 16, 30, 09, 0a, 01, 00, 02, 00, 10, 00, 11, 0a, 00, 15, 00, 16, 30, 0d, 2e, 02, 00, 00, 00, 15, 00, 16, 33, 00, 1c, 00, 1d, 28, 06, 02, 00, 1c, 00, 22, 30, 11, 1a, 01, 02, 00, 00, 1c, 00, 1d, 11, 00, 21, 00, 22, 30, 15, 22, 02, 00, 00, 00, 21, 00, 22, 15, 00, 25, 00, 29, 26, 00, 33, 00, 38, 2e, 00, 44, 00, 49, 19, 00, 4c, 02, 06, 36, 02, 0c, 02, 06, 3e, 03, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 20
+Number of expressions: 18
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(1), rhs = Expression(14, Add)
+- expression 3 operands: lhs = Counter(1), rhs = Expression(12, Add)
 - expression 4 operands: lhs = Counter(2), rhs = Counter(3)
 - expression 5 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 6 operands: lhs = Expression(14, Add), rhs = Counter(4)
+- expression 6 operands: lhs = Expression(12, Add), rhs = Counter(4)
 - expression 7 operands: lhs = Counter(2), rhs = Counter(3)
 - expression 8 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 9 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(4)
-- expression 11 operands: lhs = Expression(14, Add), rhs = Counter(5)
+- expression 9 operands: lhs = Expression(12, Add), rhs = Counter(5)
+- expression 10 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 11 operands: lhs = Counter(1), rhs = Expression(12, Add)
 - expression 12 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 13 operands: lhs = Counter(1), rhs = Expression(14, Add)
-- expression 14 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(1)
+- expression 14 operands: lhs = Counter(0), rhs = Counter(7)
 - expression 15 operands: lhs = Expression(16, Add), rhs = Counter(1)
-- expression 16 operands: lhs = Counter(0), rhs = Counter(7)
-- expression 17 operands: lhs = Expression(18, Add), rhs = Counter(1)
-- expression 18 operands: lhs = Expression(19, Add), rhs = Counter(7)
-- expression 19 operands: lhs = Counter(0), rhs = Counter(6)
+- expression 16 operands: lhs = Expression(17, Add), rhs = Counter(7)
+- expression 17 operands: lhs = Counter(0), rhs = Counter(6)
 Number of file 0 mappings: 20
 - Code(Counter(0)) at (prev + 34, 1) to (start + 1, 9)
 - MCDCDecision { bitmap_idx: 9, conditions_num: 2 } at (prev + 1, 8) to (start + 0, 75)
@@ -149,29 +144,28 @@ Number of file 0 mappings: 20
     false = (c1 - c2)
 - Code(Expression(2, Sub)) at (prev + 0, 21) to (start + 0, 22)
     = (c1 - c2)
-- MCDCBranch { true: Counter(3), false: Expression(13, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 22)
+- MCDCBranch { true: Counter(3), false: Expression(11, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 21) to (start + 0, 22)
     true  = c3
     false = (c1 - (c2 + c3))
-- Code(Expression(14, Add)) at (prev + 0, 28) to (start + 0, 29)
+- Code(Expression(12, Add)) at (prev + 0, 28) to (start + 0, 29)
     = (c2 + c3)
 - MCDCDecision { bitmap_idx: 6, conditions_num: 2 } at (prev + 0, 28) to (start + 0, 34)
 - MCDCBranch { true: Counter(4), false: Expression(6, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 28) to (start + 0, 29)
     true  = c4
     false = ((c2 + c3) - c4)
 - Code(Counter(4)) at (prev + 0, 33) to (start + 0, 34)
-- MCDCBranch { true: Expression(9, Sub), false: Counter(5), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
-    true  = (c4 - c5)
-    false = c5
-- Code(Expression(9, Sub)) at (prev + 0, 37) to (start + 0, 41)
-    = (c4 - c5)
-- Code(Expression(10, Sub)) at (prev + 0, 51) to (start + 0, 56)
-    = (((c2 + c3) + c5) - c4)
-- Code(Expression(13, Sub)) at (prev + 0, 68) to (start + 0, 73)
+- MCDCBranch { true: Counter(5), false: Expression(8, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 33) to (start + 0, 34)
+    true  = c5
+    false = (c4 - c5)
+- Code(Counter(5)) at (prev + 0, 37) to (start + 0, 41)
+- Code(Expression(9, Sub)) at (prev + 0, 51) to (start + 0, 56)
+    = ((c2 + c3) - c5)
+- Code(Expression(11, Sub)) at (prev + 0, 68) to (start + 0, 73)
     = (c1 - (c2 + c3))
 - Code(Counter(6)) at (prev + 0, 76) to (start + 2, 6)
-- Code(Expression(15, Sub)) at (prev + 2, 12) to (start + 2, 6)
+- Code(Expression(13, Sub)) at (prev + 2, 12) to (start + 2, 6)
     = ((c0 + c7) - c1)
-- Code(Expression(17, Sub)) at (prev + 3, 1) to (start + 0, 2)
+- Code(Expression(15, Sub)) at (prev + 3, 1) to (start + 0, 2)
     = (((c0 + c6) + c7) - c1)
 Highest counter ID seen: c7
 
diff --git a/tests/coverage/mcdc/non_control_flow.cov-map b/tests/coverage/mcdc/non_control_flow.cov-map
index 0edeff9a586..c282d53c5ac 100644
--- a/tests/coverage/mcdc/non_control_flow.cov-map
+++ b/tests/coverage/mcdc/non_control_flow.cov-map
@@ -1,124 +1,107 @@
 Function name: non_control_flow::assign_3
-Raw bytes (89): 0x[01, 01, 09, 07, 11, 0b, 0d, 05, 09, 01, 05, 01, 05, 01, 23, 05, 11, 01, 23, 05, 11, 0a, 01, 16, 01, 00, 28, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 04, 03, 00, 0d, 00, 18, 30, 05, 12, 01, 00, 02, 00, 0d, 00, 0e, 12, 00, 12, 00, 13, 30, 1e, 11, 02, 03, 00, 00, 12, 00, 13, 1e, 00, 17, 00, 18, 30, 09, 0d, 03, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
+Raw bytes (79): 0x[01, 01, 04, 01, 05, 01, 0b, 05, 09, 09, 0d, 0a, 01, 16, 01, 00, 28, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 04, 03, 00, 0d, 00, 18, 30, 05, 02, 01, 00, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 30, 09, 06, 02, 03, 00, 00, 12, 00, 13, 09, 00, 17, 00, 18, 30, 0d, 0e, 03, 00, 00, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 9
-- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(4)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
+Number of expressions: 4
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
 - expression 2 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 4 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 5 operands: lhs = Counter(0), rhs = Expression(8, Add)
-- expression 6 operands: lhs = Counter(1), rhs = Counter(4)
-- expression 7 operands: lhs = Counter(0), rhs = Expression(8, Add)
-- expression 8 operands: lhs = Counter(1), rhs = Counter(4)
+- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 22, 1) to (start + 0, 40)
-- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = (((c1 + c2) + c3) + c4)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - MCDCDecision { bitmap_idx: 4, conditions_num: 3 } at (prev + 0, 13) to (start + 0, 24)
-- MCDCBranch { true: Counter(1), false: Expression(4, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
-- Code(Expression(4, Sub)) at (prev + 0, 18) to (start + 0, 19)
+- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 19)
     = (c0 - c1)
-- MCDCBranch { true: Expression(7, Sub), false: Counter(4), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
-    true  = (c0 - (c1 + c4))
-    false = c4
-- Code(Expression(7, Sub)) at (prev + 0, 23) to (start + 0, 24)
-    = (c0 - (c1 + c4))
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
-    false = c3
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = (((c1 + c2) + c3) + c4)
-Highest counter ID seen: c4
+    false = (c0 - (c1 + c2))
+- Code(Counter(2)) at (prev + 0, 23) to (start + 0, 24)
+- MCDCBranch { true: Counter(3), false: Expression(3, Sub), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
+    true  = c3
+    false = (c2 - c3)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c3
 
 Function name: non_control_flow::assign_3_bis
-Raw bytes (81): 0x[01, 01, 05, 07, 11, 09, 0d, 01, 05, 05, 09, 01, 09, 0a, 01, 1b, 01, 00, 2c, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 05, 03, 00, 0d, 00, 18, 30, 05, 0a, 01, 03, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 0e, 03, 00, 02, 00, 12, 00, 13, 12, 00, 17, 00, 18, 30, 0d, 11, 02, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
+Raw bytes (81): 0x[01, 01, 05, 01, 05, 05, 09, 01, 09, 01, 13, 09, 0d, 0a, 01, 1b, 01, 00, 2c, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 05, 03, 00, 0d, 00, 18, 30, 05, 02, 01, 03, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 06, 03, 00, 02, 00, 12, 00, 13, 0a, 00, 17, 00, 18, 30, 0d, 0e, 02, 00, 00, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 5
-- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(4)
-- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 3 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 4 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 3 operands: lhs = Counter(0), rhs = Expression(4, Add)
+- expression 4 operands: lhs = Counter(2), rhs = Counter(3)
 Number of file 0 mappings: 10
 - Code(Counter(0)) at (prev + 27, 1) to (start + 0, 44)
-- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = ((c2 + c3) + c4)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - MCDCDecision { bitmap_idx: 5, conditions_num: 3 } at (prev + 0, 13) to (start + 0, 24)
-- MCDCBranch { true: Counter(1), false: Expression(2, Sub), condition_id: 1, true_next_id: 3, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 3, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19)
-- MCDCBranch { true: Counter(2), false: Expression(3, Sub), condition_id: 3, true_next_id: 0, false_next_id: 2 } at (prev + 0, 18) to (start + 0, 19)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 3, true_next_id: 0, false_next_id: 2 } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
     false = (c1 - c2)
-- Code(Expression(4, Sub)) at (prev + 0, 23) to (start + 0, 24)
+- Code(Expression(2, Sub)) at (prev + 0, 23) to (start + 0, 24)
     = (c0 - c2)
-- MCDCBranch { true: Counter(3), false: Counter(4), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
+- MCDCBranch { true: Counter(3), false: Expression(3, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
     true  = c3
-    false = c4
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = ((c2 + c3) + c4)
-Highest counter ID seen: c4
+    false = (c0 - (c2 + c3))
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c3
 
 Function name: non_control_flow::assign_and
-Raw bytes (64): 0x[01, 01, 04, 07, 05, 0b, 0d, 01, 09, 01, 05, 08, 01, 0c, 01, 00, 21, 02, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 02, 01, 05, 01, 02]
+Raw bytes (60): 0x[01, 01, 02, 01, 05, 05, 09, 08, 01, 0c, 01, 00, 21, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 02, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 06, 02, 00, 00, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
-- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(2)
-- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
+Number of expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 33)
-- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
-    = (((c0 + c2) + c3) - c1)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 13) to (start + 0, 19)
-- MCDCBranch { true: Counter(1), false: Expression(3, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19)
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
-    false = c3
-- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 1, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+    false = (c1 - c2)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c2
 
 Function name: non_control_flow::assign_or
-Raw bytes (64): 0x[01, 01, 04, 07, 0d, 05, 09, 01, 05, 01, 05, 08, 01, 11, 01, 00, 20, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 00, 02, 00, 0d, 00, 0e, 0e, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 03, 01, 05, 01, 02]
+Raw bytes (62): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 08, 01, 11, 01, 00, 20, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 02, 01, 00, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 30, 09, 06, 02, 00, 00, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
-- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
-- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
+Number of expressions: 3
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
+- expression 2 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 8
 - Code(Counter(0)) at (prev + 17, 1) to (start + 0, 32)
-- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
-    = ((c1 + c2) + c3)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 0, 13) to (start + 0, 19)
-- MCDCBranch { true: Counter(1), false: Expression(3, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
-- Code(Expression(3, Sub)) at (prev + 0, 18) to (start + 0, 19)
+- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 19)
     = (c0 - c1)
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
     true  = c2
-    false = c3
-- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
-    = ((c1 + c2) + c3)
-Highest counter ID seen: c3
+    false = (c0 - (c1 + c2))
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c2
 
 Function name: non_control_flow::foo
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 25, 01, 02, 02]
@@ -130,14 +113,12 @@ Number of file 0 mappings: 1
 Highest counter ID seen: c0
 
 Function name: non_control_flow::func_call
-Raw bytes (54): 0x[01, 01, 04, 01, 05, 0b, 05, 0f, 0d, 01, 09, 06, 01, 29, 01, 01, 0a, 28, 03, 02, 01, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 0d, 02, 00, 00, 00, 0e, 00, 0f, 06, 01, 01, 00, 02]
+Raw bytes (50): 0x[01, 01, 02, 01, 05, 05, 09, 06, 01, 29, 01, 01, 0a, 28, 03, 02, 01, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 06, 02, 00, 00, 00, 0e, 00, 0f, 01, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 4
+Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(1)
-- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(3)
-- expression 3 operands: lhs = Counter(0), rhs = Counter(2)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 6
 - Code(Counter(0)) at (prev + 41, 1) to (start + 1, 10)
 - MCDCDecision { bitmap_idx: 3, conditions_num: 2 } at (prev + 1, 9) to (start + 0, 15)
@@ -145,66 +126,46 @@ Number of file 0 mappings: 6
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 14) to (start + 0, 15)
-- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 14) to (start + 0, 15)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 14) to (start + 0, 15)
     true  = c2
-    false = c3
-- Code(Expression(1, Sub)) at (prev + 1, 1) to (start + 0, 2)
-    = (((c0 + c2) + c3) - c1)
-Highest counter ID seen: c3
+    false = (c1 - c2)
+- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
+Highest counter ID seen: c2
 
 Function name: non_control_flow::right_comb_tree
-Raw bytes (139): 0x[01, 01, 13, 07, 05, 0b, 19, 0f, 15, 13, 11, 17, 0d, 01, 09, 01, 05, 05, 09, 05, 09, 05, 4b, 09, 0d, 05, 4b, 09, 0d, 05, 47, 4b, 11, 09, 0d, 05, 47, 4b, 11, 09, 0d, 0e, 01, 20, 01, 00, 41, 02, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 06, 05, 00, 0d, 00, 2a, 30, 05, 1a, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 30, 22, 09, 02, 03, 00, 00, 13, 00, 14, 22, 00, 19, 00, 1a, 30, 2e, 0d, 03, 04, 00, 00, 19, 00, 1a, 2e, 00, 1f, 00, 20, 30, 42, 11, 04, 05, 00, 00, 1f, 00, 20, 42, 00, 24, 00, 27, 30, 15, 19, 05, 00, 00, 00, 24, 00, 27, 02, 01, 05, 01, 02]
+Raw bytes (111): 0x[01, 01, 05, 01, 05, 05, 09, 09, 0d, 0d, 11, 11, 15, 0e, 01, 20, 01, 00, 41, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 06, 05, 00, 0d, 00, 2a, 30, 05, 02, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 30, 09, 06, 02, 03, 00, 00, 13, 00, 14, 09, 00, 19, 00, 1a, 30, 0d, 0a, 03, 04, 00, 00, 19, 00, 1a, 0d, 00, 1f, 00, 20, 30, 11, 0e, 04, 05, 00, 00, 1f, 00, 20, 11, 00, 24, 00, 27, 30, 15, 12, 05, 00, 00, 00, 24, 00, 27, 01, 01, 05, 01, 02]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 19
-- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(6)
-- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(5)
-- expression 3 operands: lhs = Expression(4, Add), rhs = Counter(4)
-- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(3)
-- expression 5 operands: lhs = Counter(0), rhs = Counter(2)
-- expression 6 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 7 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 8 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 9 operands: lhs = Counter(1), rhs = Expression(18, Add)
-- expression 10 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 11 operands: lhs = Counter(1), rhs = Expression(18, Add)
-- expression 12 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 13 operands: lhs = Counter(1), rhs = Expression(17, Add)
-- expression 14 operands: lhs = Expression(18, Add), rhs = Counter(4)
-- expression 15 operands: lhs = Counter(2), rhs = Counter(3)
-- expression 16 operands: lhs = Counter(1), rhs = Expression(17, Add)
-- expression 17 operands: lhs = Expression(18, Add), rhs = Counter(4)
-- expression 18 operands: lhs = Counter(2), rhs = Counter(3)
+Number of expressions: 5
+- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
+- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
 Number of file 0 mappings: 14
 - Code(Counter(0)) at (prev + 32, 1) to (start + 0, 65)
-- Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 10)
-    = ((((((c0 + c2) + c3) + c4) + c5) + c6) - c1)
+- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 10)
 - Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
 - MCDCDecision { bitmap_idx: 6, conditions_num: 5 } at (prev + 0, 13) to (start + 0, 42)
-- MCDCBranch { true: Counter(1), false: Expression(6, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
+- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
     true  = c1
     false = (c0 - c1)
 - Code(Counter(1)) at (prev + 0, 19) to (start + 0, 20)
-- MCDCBranch { true: Expression(8, Sub), false: Counter(2), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
-    true  = (c1 - c2)
-    false = c2
-- Code(Expression(8, Sub)) at (prev + 0, 25) to (start + 0, 26)
-    = (c1 - c2)
-- MCDCBranch { true: Expression(11, Sub), false: Counter(3), condition_id: 3, true_next_id: 4, false_next_id: 0 } at (prev + 0, 25) to (start + 0, 26)
-    true  = (c1 - (c2 + c3))
-    false = c3
-- Code(Expression(11, Sub)) at (prev + 0, 31) to (start + 0, 32)
-    = (c1 - (c2 + c3))
-- MCDCBranch { true: Expression(16, Sub), false: Counter(4), condition_id: 4, true_next_id: 5, false_next_id: 0 } at (prev + 0, 31) to (start + 0, 32)
-    true  = (c1 - ((c2 + c3) + c4))
-    false = c4
-- Code(Expression(16, Sub)) at (prev + 0, 36) to (start + 0, 39)
-    = (c1 - ((c2 + c3) + c4))
-- MCDCBranch { true: Counter(5), false: Counter(6), condition_id: 5, true_next_id: 0, false_next_id: 0 } at (prev + 0, 36) to (start + 0, 39)
+- MCDCBranch { true: Counter(2), false: Expression(1, Sub), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
+    true  = c2
+    false = (c1 - c2)
+- Code(Counter(2)) at (prev + 0, 25) to (start + 0, 26)
+- MCDCBranch { true: Counter(3), false: Expression(2, Sub), condition_id: 3, true_next_id: 4, false_next_id: 0 } at (prev + 0, 25) to (start + 0, 26)
+    true  = c3
+    false = (c2 - c3)
+- Code(Counter(3)) at (prev + 0, 31) to (start + 0, 32)
+- MCDCBranch { true: Counter(4), false: Expression(3, Sub), condition_id: 4, true_next_id: 5, false_next_id: 0 } at (prev + 0, 31) to (start + 0, 32)
+    true  = c4
+    false = (c3 - c4)
+- Code(Counter(4)) at (prev + 0, 36) to (start + 0, 39)
+- MCDCBranch { true: Counter(5), false: Expression(4, Sub), condition_id: 5, true_next_id: 0, false_next_id: 0 } at (prev + 0, 36) to (start + 0, 39)
     true  = c5
-    false = c6
-- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 1, 2)
-    = ((((((c0 + c2) + c3) + c4) + c5) + c6) - c1)
-Highest counter ID seen: c6
+    false = (c4 - c5)
+- Code(Counter(0)) at (prev + 1, 5) to (start + 1, 2)
+Highest counter ID seen: c5