mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-20 18:52:28 +00:00
[qfcc] Create vector lists only for constants
Defs and symbols benefit from swizzling as that's one instruction vs 2-3 for loading a scalar into a vector component by component. Constants are ok because the result gets converted to a vector constant.
This commit is contained in:
parent
be4021f8f4
commit
b9bd45ad99
1 changed files with 1 additions and 2 deletions
|
@ -658,8 +658,7 @@ convert_scalar (expr_t *scalar, int op, expr_t *vec)
|
|||
// expand the scalar to a vector of the same width as vec
|
||||
type_t *vec_type = get_type (vec);
|
||||
|
||||
if (scalar->type == ex_symbol || scalar->type == ex_def
|
||||
|| is_constant (scalar)) {
|
||||
if (is_constant (scalar)) {
|
||||
for (int i = 1; i < type_width (get_type (vec)); i++) {
|
||||
expr_t *s = copy_expr (scalar);
|
||||
s->next = scalar;
|
||||
|
|
Loading…
Reference in a new issue