From a279ae9354f485846ec44cda4ebde19ba025359b Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 16 Oct 2017 11:56:06 -0600 Subject: [PATCH] * tree-ssa-dse.c (live_bytes_read): Fix thinko. From-SVN: r253792 --- gcc/ChangeLog | 4 ++++ gcc/tree-ssa-dse.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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; -- 2.30.2