* tree-ssa-dse.c (live_bytes_read): Fix thinko.
authorJeff Law <law@redhat.com>
Mon, 16 Oct 2017 17:56:06 +0000 (11:56 -0600)
committerJeff Law <law@gcc.gnu.org>
Mon, 16 Oct 2017 17:56:06 +0000 (11:56 -0600)
From-SVN: r253792

gcc/ChangeLog
gcc/tree-ssa-dse.c

index ab0d1f6..df26aeb 100644 (file)
@@ -1,3 +1,7 @@
+2017-10-16  Jeff Law  <law@redhat.com>
+
+       * tree-ssa-dse.c (live_bytes_read): Fix thinko.
+
 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
 
        * x86-tune-costs.h (znver1_cost): Fix move cost tables.
index 9d6cb14..c1a6475 100644 (file)
@@ -493,7 +493,7 @@ live_bytes_read (ao_ref use_ref, ao_ref *ref, sbitmap live)
 
       /* Now check if any of the remaining bits in use_ref are set in LIVE.  */
       unsigned int start = (use_ref.offset - ref->offset) / BITS_PER_UNIT;
-      unsigned int end  = ((use_ref.offset + use_ref.size) / BITS_PER_UNIT) - 1;
+      unsigned int end = start + (use_ref.size / BITS_PER_UNIT) - 1;
       return bitmap_bit_in_range_p (live, start, end);
     }
   return true;