]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/reginfo.c
poly_int: SUBREG_BYTE
[thirdparty/gcc.git] / gcc / reginfo.c
index 4061736f537efeb6227ebe9df907a43db0b40c08..3d1c2ed51664f56dea5d9ad7f00914184f70abac 100644 (file)
@@ -1206,7 +1206,9 @@ reg_classes_intersect_p (reg_class_t c1, reg_class_t c2)
 inline hashval_t
 simplifiable_subregs_hasher::hash (const simplifiable_subreg *value)
 {
-  return value->shape.unique_id ();
+  inchash::hash h;
+  h.add_hwi (value->shape.unique_id ());
+  return h.end ();
 }
 
 inline bool
@@ -1231,9 +1233,11 @@ simplifiable_subregs (const subreg_shape &shape)
   if (!this_target_hard_regs->x_simplifiable_subregs)
     this_target_hard_regs->x_simplifiable_subregs
       = new hash_table <simplifiable_subregs_hasher> (30);
+  inchash::hash h;
+  h.add_hwi (shape.unique_id ());
   simplifiable_subreg **slot
     = (this_target_hard_regs->x_simplifiable_subregs
-       ->find_slot_with_hash (&shape, shape.unique_id (), INSERT));
+       ->find_slot_with_hash (&shape, h.end (), INSERT));
 
   if (!*slot)
     {
@@ -1294,7 +1298,7 @@ record_subregs_of_mode (rtx subreg, bool partial_def)
       unsigned int size = MAX (REGMODE_NATURAL_SIZE (shape.inner_mode),
                               GET_MODE_SIZE (shape.outer_mode));
       gcc_checking_assert (size < GET_MODE_SIZE (shape.inner_mode));
-      if (shape.offset >= size)
+      if (known_ge (shape.offset, size))
        shape.offset -= size;
       else
        shape.offset += size;