diff options
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 5f14d81..c0cbeb3 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1215,8 +1215,11 @@ expand_one_var (tree var, bool toplevel, bool really_expand) we conservatively assume it will be on stack even if VAR is eventually put into register after RA pass. For non-automatic variables, which won't be on stack, we collect alignment of - type and ignore user specified alignment. */ - if (TREE_STATIC (var) || DECL_EXTERNAL (var)) + type and ignore user specified alignment. Similarly for + SSA_NAMEs for which use_register_for_decl returns true. */ + if (TREE_STATIC (var) + || DECL_EXTERNAL (var) + || (TREE_CODE (origvar) == SSA_NAME && use_register_for_decl (var))) align = MINIMUM_ALIGNMENT (TREE_TYPE (var), TYPE_MODE (TREE_TYPE (var)), TYPE_ALIGN (TREE_TYPE (var))); |