diff options
author | Martin Jambor <mjambor@suse.cz> | 2013-12-05 19:07:08 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2013-12-05 19:07:08 +0100 |
commit | e69dbe3721a150e221e05edde4985dd961edafd1 (patch) | |
tree | 1fdbd33ff1c15f9fbf9180467dbbc1dafa0fefba /gcc/ipa-prop.c | |
parent | 1769415d4a5b8da1a07ad91bb073c5ae50cebabd (diff) | |
download | gcc-e69dbe3721a150e221e05edde4985dd961edafd1.zip gcc-e69dbe3721a150e221e05edde4985dd961edafd1.tar.gz gcc-e69dbe3721a150e221e05edde4985dd961edafd1.tar.bz2 |
re PR ipa/58253 (IPA-SRA creates calls with different arguments that the callee accepts)
2013-12-05 Martin Jambor <mjambor@suse.cz>
PR ipa/58253
* ipa-prop.c (ipa_modify_formal_parameters): Create decls of
non-BLKmode in their naturally aligned type.
From-SVN: r205715
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 712dab7..83dc53e 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -3444,7 +3444,15 @@ ipa_modify_formal_parameters (tree fndecl, ipa_parm_adjustment_vec adjustments) if (adj->by_ref) ptype = build_pointer_type (adj->type); else - ptype = adj->type; + { + ptype = adj->type; + if (is_gimple_reg_type (ptype)) + { + unsigned malign = GET_MODE_ALIGNMENT (TYPE_MODE (ptype)); + if (TYPE_ALIGN (ptype) < malign) + ptype = build_aligned_type (ptype, malign); + } + } if (care_for_types) new_arg_types = tree_cons (NULL_TREE, ptype, new_arg_types); |