diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2002-05-31 02:21:31 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2002-05-31 02:21:31 +0000 |
commit | 00182e1edccfe503b6a28319215123d35b07af19 (patch) | |
tree | 0cc15e47f21164650f205cb28792b9e1e8005076 /gcc/expr.c | |
parent | b4eb03fef0038be54957aea4e18b2e79c4452937 (diff) | |
download | gcc-00182e1edccfe503b6a28319215123d35b07af19.zip gcc-00182e1edccfe503b6a28319215123d35b07af19.tar.gz gcc-00182e1edccfe503b6a28319215123d35b07af19.tar.bz2 |
expr.c (expand_expr): Output partially zeroed out vectors with output_constant_def.
2002-05-31 Aldy Hernandez <aldyh@redhat.com>
* expr.c (expand_expr): Output partially zeroed out vectors with
output_constant_def.
From-SVN: r54080
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -6758,7 +6758,13 @@ expand_expr (exp, target, tmode, modifier) fold. Likewise, if we have a target we can use, it is best to store directly into the target unless the type is large enough that memcpy will be used. If we are making an initializer and - all operands are constant, put it in memory as well. */ + all operands are constant, put it in memory as well. + + FIXME: Avoid trying to fill vector constructors piece-meal. + Output them with output_constant_def below unless we're sure + they're zeros. This should go away when vector initializers + are treated like VECTOR_CST instead of arrays. + */ else if ((TREE_STATIC (exp) && ((mode == BLKmode && ! (target != 0 && safe_from_p (target, exp, 1))) @@ -6767,7 +6773,9 @@ expand_expr (exp, target, tmode, modifier) && (! MOVE_BY_PIECES_P (tree_low_cst (TYPE_SIZE_UNIT (type), 1), TYPE_ALIGN (type))) - && ! mostly_zeros_p (exp)))) + && ((TREE_CODE (type) == VECTOR_TYPE + && !is_zeros_p (exp)) + || ! mostly_zeros_p (exp))))) || (modifier == EXPAND_INITIALIZER && TREE_CONSTANT (exp))) { rtx constructor = output_constant_def (exp, 1); |