mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-08 10:21:40 +00:00
[qfcc] Respect commutativity when optimizing adds
This fixes the really odd bug of certain string values getting swapped in vkgen when DEBUG_QF_MEMORY was defined in expr.c. It will also prevent a lot of fun with floats in the future, I imagine.
This commit is contained in:
parent
0974983a39
commit
360dfc0038
1 changed files with 4 additions and 2 deletions
|
@ -550,8 +550,10 @@ optimize_core (const expr_t *expr)
|
|||
optimize_extends (adds);
|
||||
optimize_extends (subs);
|
||||
|
||||
optimize_adds (adds);
|
||||
optimize_adds (subs);
|
||||
if (expr->expr.commutative) {
|
||||
optimize_adds (adds);
|
||||
optimize_adds (subs);
|
||||
}
|
||||
|
||||
optimize_cross_products (adds, subs);
|
||||
optimize_scale_products (adds, subs);
|
||||
|
|
Loading…
Reference in a new issue