[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug rtl-optimization/31944] [4.1/4.2/4.3 Regression] Endless loop while building a 64-bit 2.6.20 kernel




------- Comment #19 from rguenth at gcc dot gnu dot org  2008-01-09 15:36 -------
(reg:DI 66 [ type.0+-4 ]) is entered twice in the table.  During flushing we
hit:

Breakpoint 5, flush_hash_table ()
    at /space/rguenther/src/svn/trunk/gcc/cse.c:1634
1634            if (REG_P (p->exp))
(reg:DI 66 [ type.0+-4 ])
$14 = 1
$15 = (struct table_elt *) 0x1159440

...

Breakpoint 5, flush_hash_table ()
    at /space/rguenther/src/svn/trunk/gcc/cse.c:1634
1634            if (REG_P (p->exp))
(reg:DI 66 [ type.0+-4 ])
$32 = 5
$33 = (struct table_elt *) 0x11594a0
(gdb) print *p
$34 = {exp = 0x2ac6c01389a0, canon_exp = 0x0, next_same_hash = 0x0, 
  prev_same_hash = 0x0, next_same_value = 0x0, prev_same_value = 0x0, 
  first_same_value = 0x11594a0, related_value = 0x0, cost = 0, regcost = 1, 
  mode = SImode, in_memory = 0 '\0', is_const = 0 '\0', flag = -1 '�'}

and the hash of this reg is 29, not 5.

But for the first entry we come along the hash is 1 and matches.  So
I suppose we have twice the same pseudo in the table, but as we only
have one QTY per pseudo, the hash gets messed up.

Indeed, the time we try to remove the second entry the QTY is actually
invalid:

$74 = {timestamp = 1, reg_qty = -67, reg_tick = 3, reg_in_table = -1, 
  subreg_ticked = 4294967295}


Reduced testcase:

int type;
void stuck(int res)
{
  if (type == 1) {
    if (res == 0) asm volatile("nop");
  }
  else if (type == 0) {
    if (res == 0) asm volatile("nop" : : "i" (0));
  }
}

fails with -O2 on x86_64 -> hppa64-linux cross.

Steven - do you have an idea where to look further?  Thx.


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Reply to: