This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab



------- Comment #2 from krebbel at gcc dot gnu dot org  2008-10-06 14:07 -------
Just to check whether the propagation of the conflicting hard regs in
ira_flatting really is the main problem I've tried the following patch. With
that patch the ira branch bootstraps on s390x.

Index: gcc/ira-build.c
===================================================================
--- gcc/ira-build.c.orig        2008-10-06 11:16:39.000000000 +0200
+++ gcc/ira-build.c     2008-10-06 14:44:57.000000000 +0200
@@ -2147,7 +2147,7 @@ ira_flattening (int max_regno_before_emi
          ira_assert (ALLOCNO_CAP_MEMBER (parent_a) == NULL);
          if (ALLOCNO_MEM_OPTIMIZED_DEST (a) != NULL)
            mem_dest_p = true;
-         if (propagate_p)
+         /*      if (propagate_p)*/
            {
              if (!allocno_propagated_p [ALLOCNO_NUM (parent_a)])
                COPY_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (parent_a),

I think one reason why this problem does not occur more often and not on other
targets is that on S/390 r6 is used as argument register but is also call
saved!

The conflict between r52 and hard reg r6 is recorded for an instruction which
loads the argument for a function call. Since such an INSN is most likely more
or less directly followed by a call instruction the missing propagation of
conflicting hard regs is papered over by ira_build_conflicts. This function
always adds the call clobbered registers to the conflict sets of pseudos which
are live across function calls. For r6 on S/390 this does not happen what - at
least to my understanding - reveals the bug in ira_flattening.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]