mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 00:10:40 +00:00
[qfcc] Handle cancellations in large chains
It turned out I wasn't shuffling canceled terms correctly, thus far too many hours of bug hunting.
This commit is contained in:
parent
35ec9062cf
commit
3f40977ecb
1 changed files with 1 additions and 4 deletions
|
@ -590,6 +590,7 @@ sum_expr (type_t *type, const expr_t *a, const expr_t *b)
|
|||
break;
|
||||
}
|
||||
}
|
||||
dstsub = srcsub;
|
||||
if (*srcsub++) {
|
||||
// found a-a
|
||||
while (*srcsub) {
|
||||
|
@ -621,9 +622,6 @@ component_sum (int op, const expr_t **c, const expr_t **a, const expr_t **b,
|
|||
} else {
|
||||
c[i] = sum_expr (sum_type, a[i], neg_expr (b[i]));
|
||||
}
|
||||
if (c[i]) {
|
||||
c[i] = fold_constants (c[i]);
|
||||
}
|
||||
} else if (a[i]) {
|
||||
c[i] = a[i];
|
||||
} else if (b[i]) {
|
||||
|
@ -631,7 +629,6 @@ component_sum (int op, const expr_t **c, const expr_t **a, const expr_t **b,
|
|||
c[i] = b[i];
|
||||
} else {
|
||||
c[i] = neg_expr (b[i]);
|
||||
c[i] = fold_constants (c[i]);
|
||||
}
|
||||
} else {
|
||||
c[i] = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue