From: Jeff Law Date: Mon, 16 Oct 2017 17:56:06 +0000 (-0600) Subject: * tree-ssa-dse.c (live_bytes_read): Fix thinko. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a279ae9354f485846ec44cda4ebde19ba025359b;p=gcc.git * tree-ssa-dse.c (live_bytes_read): Fix thinko. From-SVN: r253792 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab0d1f6ac63..df26aeb2ada 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-10-16 Jeff Law + + * tree-ssa-dse.c (live_bytes_read): Fix thinko. + 2017-10-16 Jan Hubicka * x86-tune-costs.h (znver1_cost): Fix move cost tables. diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index 9d6cb146436..c1a6475afe1 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -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;