------- Comment #35 from bergner at gcc dot gnu dot org  2007-02-12 17:29 
-------
Created an attachment (id=13042)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13042&action=view)
Alternate patch to commutative_operand_precedence to increase the precedence of
REG_POINTER and MEM_POINTER objects.

Ok, now that the libjava multilib problems have been fixed, I've been
able to attempt to bootstrap the patch in Comment #34 with java enabled.
In doing so, I'm now hitting an ICE while building the 64-bit libgcj.
The ICE is occurring in the same location and for the same reason as
the ICE (optabs.c:emit_cmp_and_jump_insns()) I hit when I attempted
to change swap_commutative_operands_p() (as in this alternate
patch) so that it sorted REG's by register numbers similar to how
simplify_plus_minus_op_data_cmp() sorts them.

With this attached alternate patch, we have a simple testcase that 
exposes the problem:

  void
  gomp_sem_wait_slow (int *sem, int a, int b)
  {
    __sync_bool_compare_and_swap (sem, a, b);
  }

For this testcase, the swap_commutative_operands_p (x, y) call that guards
the gcc_assert (label) we're failing in, "x" and "y" are simple REGs that
are swapped due to REGNO(y) is smaller then RGENO(x).  I don't understand
why the gcc_assert(label) is needed, but I'll try and track that down.


-- 

bergner at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bergner at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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

Reply via email to