]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR ipa/58253 (IPA-SRA creates calls with different arguments that the callee accepts)
authorMartin Jambor <mjambor@suse.cz>
Thu, 5 Dec 2013 18:07:08 +0000 (19:07 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Thu, 5 Dec 2013 18:07:08 +0000 (19:07 +0100)
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

gcc/ChangeLog
gcc/ipa-prop.c

index 55757a06caf59eb532af51d62dcd8829e41f963c..d4a52ee3d96ce072bf4e310ab48076a5f7b8c924 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2013-12-05  Marek Polacek  <polacek@redhat.com>
 
        PR sanitizer/59333
index 712dab76c50db69aa437745772a5fd7b35d61204..83dc53e93446d6df3ead066521e5b767b7ddaea2 100644 (file)
@@ -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);