Commit 00182e1e by Aldy Hernandez Committed by Aldy Hernandez

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
parent b4eb03fe
2002-05-31 Aldy Hernandez <aldyh@redhat.com>
* expr.c (expand_expr): Output partially zeroed out vectors with
output_constant_def.
2002-05-30 Jason Thorpe <thorpej@wasabisystems.com> 2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
* config.gcc (sh[123456789l]*-*-*): Set cpu_type to sh. * config.gcc (sh[123456789l]*-*-*): Set cpu_type to sh.
......
...@@ -6758,7 +6758,13 @@ expand_expr (exp, target, tmode, modifier) ...@@ -6758,7 +6758,13 @@ expand_expr (exp, target, tmode, modifier)
fold. Likewise, if we have a target we can use, it is best to 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 store directly into the target unless the type is large enough
that memcpy will be used. If we are making an initializer and 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) else if ((TREE_STATIC (exp)
&& ((mode == BLKmode && ((mode == BLKmode
&& ! (target != 0 && safe_from_p (target, exp, 1))) && ! (target != 0 && safe_from_p (target, exp, 1)))
...@@ -6767,7 +6773,9 @@ expand_expr (exp, target, tmode, modifier) ...@@ -6767,7 +6773,9 @@ expand_expr (exp, target, tmode, modifier)
&& (! MOVE_BY_PIECES_P && (! MOVE_BY_PIECES_P
(tree_low_cst (TYPE_SIZE_UNIT (type), 1), (tree_low_cst (TYPE_SIZE_UNIT (type), 1),
TYPE_ALIGN (type))) 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))) || (modifier == EXPAND_INITIALIZER && TREE_CONSTANT (exp)))
{ {
rtx constructor = output_constant_def (exp, 1); rtx constructor = output_constant_def (exp, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment