diff options
author | Richard Biener <rguenther@suse.de> | 2021-04-01 11:51:33 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-04-01 12:46:48 +0200 |
commit | 512429a885e87bef51057a001681b7d8d106e807 (patch) | |
tree | ad579aca5221f75c56ff39e1cb6f4d3eafd68349 /gcc | |
parent | 3064fc21aa29d8e04b23c0b52dc4f67de1da6b2f (diff) | |
download | gcc-512429a885e87bef51057a001681b7d8d106e807.zip gcc-512429a885e87bef51057a001681b7d8d106e807.tar.gz gcc-512429a885e87bef51057a001681b7d8d106e807.tar.bz2 |
tree-optimization/99863 - clear vector CTOR TREE_SIDE_EFFECTS
When we gimplify a vector CTOR the original CONSTRUCTOR tree remains
but we fail to recompute flags such as TREE_SIDE_EFFECTS. This causes
later GENERIC folding of them in vector lowering to give up since
the match.pd machinery is careful about TREE_SIDE_EFFECTS.
Fixing this makes vector lowering produce much less garbage and
thus following the IL for PR99793 easier.
2021-04-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/99863
* gimplify.c (gimplify_init_constructor): Recompute vector
constructor flags.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimplify.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 6da6698..1f417a5 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -5231,6 +5231,7 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, TREE_TYPE (ce->value))) TREE_STATIC (ctor) = 0; } + recompute_constructor_flags (ctor); if (!is_gimple_reg (TREE_OPERAND (*expr_p, 0))) TREE_OPERAND (*expr_p, 1) = get_formal_tmp_var (ctor, pre_p); } |