The following patch avoids overaligned types created from IPA parameter
replacement.  It is said to help mipsel which still suffers from the
backend-looks-at-type-alignment-for-parameter-passing-ABI bug.

Bootstrap and regtest pending on x86_64-unknown-linux-gnu.

mips testing appreciated.

Richard.

2016-08-05  Richard Biener  <rguent...@suse.de>

        PR ipa/68273
        * ipa-prop.c (ipa_modify_formal_parameters): Build
        parameter types with natural alignment also for the
        over-aligned case.

Index: gcc/ipa-prop.c
===================================================================
--- gcc/ipa-prop.c      (revision 239164)
+++ gcc/ipa-prop.c      (working copy)
@@ -3910,7 +3909,7 @@ ipa_modify_formal_parameters (tree fndec
              if (is_gimple_reg_type (ptype))
                {
                  unsigned malign = GET_MODE_ALIGNMENT (TYPE_MODE (ptype));
-                 if (TYPE_ALIGN (ptype) < malign)
+                 if (TYPE_ALIGN (ptype) != malign)
                    ptype = build_aligned_type (ptype, malign);
                }
            }

Reply via email to