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/37884] [4.4 Regression] Bootstrap failure due to miscompilation of tree-vrp.c



------- Comment #1 from krebbel at gcc dot gnu dot org  2008-10-22 12:51 -------
The problem again (similar to PR37674) seems to be related to the
propagation of the hard reg conflict sets in ira_flattening.  The
conflict sets are only propagated to the parent allocno if the child
allocno uses the same pseudo.  This breaks the case below.

The miscompile is created by IRA when assigning hard reg r14 to pseudo
r295.  That way the call in L4 might be reached with the clobbered
value of r14 residing in r8.

Assigning r14 to r295 seems to be valid in loop L1 but it is not in
the nested loop L4 since L4 contains a call insn which clobbers r14.
The conflict of a147r315 with r14 is properly recorded but is not
propagated to L1 in ira_flattening.

r295 as well as r315 are created by change_loop as copies of r83 in L0.



 +-----------------+
 |   +--------+    |
 |   | bb 38  |    |
 |   | r295=r7|    |
 |   +--------+    |
 |a8r83   |      L0|
 +--------+--------+
          |
 +--------+--------+     +-----------------------------------+
 |        v        |     |                    +-----------+  |
 |     +-----+     |     |   +-----+<---------|bb 57      |  |
 |     |bb 93|<----+-----+---|bb 71|          |r2=r8      |  |
 |     +-----+     |     |   +-----+--------->|clobber r14|  |
 |        |        |     |     ^              +-----------+  |
 |        |        |     |     |                             |
 |        v        |     |     |                             |
 |   +---------+   |     |     |         a147r315            |
 |   | bb 50   |---+-----+-----+                             |
 |   | r8=r295 |   |     |                                 L4|
 |   +---------+   |     +-----------------------------------+
 |                 |
 |   a57r295     L1|
 +-----------------+


-- 

krebbel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |vmakarov at gcc dot gnu dot
                   |dot org                     |org


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


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