This is the mail archive of the gcc@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]

[new-regalloc-branch] (s390): Failure in reload_cse_simplify_operands


Hello,
             did some more testing. Compiler configured for
s390-ibm-linux-gnu on
new-regalloc-branch failed in bootstrap. After doing some compression of
test case following error can be seen:

./cc1 bit.c -O3 -da -dp
 bitmap_operation
bit.c: In function `bitmap_operation':
bit.c:79: insn does not satisfy its constraints:

(insn 373 370 147 (set (reg:SI 6 %r6)
        (reg:SI 18 %f4)) 56 {*movsi} (nil)
    (nil))

bit.c:79: Internal compiler error in reload_cse_simplify_operands, at
reload1.c:8358

S390 has no easy way to load an fpr to a gpr, secondary memory is needed.
Look like reload does not handle case above right. I will take a closer
look
into that, but maybe somebody knows what's wrong here.

bit.c:

 typedef struct bitmap_element_def
{
  struct bitmap_element_def *next;
  struct bitmap_element_def *prev;
  unsigned int indx;
  unsigned long long bits[2];
} bitmap_element;


typedef struct bitmap_head_def {
  bitmap_element *first;
  bitmap_element *current;
  unsigned int indx;

} bitmap_head, *bitmap;


enum bitmap_bits {
  BITMAP_AND,
  BITMAP_AND_COMPL,
  BITMAP_IOR,
  BITMAP_XOR,
  BITMAP_IOR_COMPL
};

bitmap_element bitmap_zero_bits;
static bitmap_element *bitmap_free;

int
bitmap_operation (to, from1, from2, operation)
     bitmap to;
     bitmap from1;
     bitmap from2;
     enum bitmap_bits operation;
{


  bitmap_element *from1_ptr = from1->first;
  bitmap_element *from2_ptr = from2->first;
  unsigned int indx1 = (from1_ptr) ? from1_ptr->indx : (unsigned int) ~0;
  unsigned int indx2 = (from2_ptr) ? from2_ptr->indx : (unsigned int) ~0;
  bitmap_element *to_ptr = to->first;
  bitmap_element *from1_tmp;
  bitmap_element *from2_tmp;
  bitmap_element *to_tmp;
  unsigned int indx;
  int changed = 0;  to->first = to->current = 0;

  while (from1_ptr != 0 || from2_ptr != 0)
    {

      if (indx1 == indx2)
        {
          from1_tmp = from1_ptr;
          from2_tmp = from2_ptr;
          from1_ptr = from1_ptr->next;
          indx1 = (from1_ptr) ? from1_ptr->indx : (unsigned int) ~0;
          from2_ptr = from2_ptr->next;
          indx2 = (from2_ptr) ? from2_ptr->indx : (unsigned int) ~0;
        }
      {
          unsigned long long t0, t1, f10, f11, f20, f21;
          f10 = from1_tmp->bits[0];
          f20 = from2_tmp->bits[0];
          t0 = f10 ^ f20;
          changed |= (t0 != to_tmp->bits[0]);
          f11 = from1_tmp->bits[1];
          f21 = from2_tmp->bits[1];
          t1 = f11 ^ f21;
          changed |= (t1 != to_tmp->bits[1]);
          to_tmp->bits[0] = t0;
          to_tmp->bits[1] = t1;
      }
    }

  return changed;
}



      regards,
            Hartmut



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