diff mbox series

[Obvious] Remove redundant check on component distance

Message ID DB5PR0801MB27421E1227358E62B193B75CE72F0@DB5PR0801MB2742.eurprd08.prod.outlook.com
State New
Headers show
Series [Obvious] Remove redundant check on component distance | expand

Commit Message

Bin Cheng Nov. 17, 2017, 1:48 p.m. UTC
Hi,
This is an obvious patch removing redundant check on component distance in
tree-predcom.c  Bootstrap and test along with next patch.  Is it OK?

Thanks,
bin
2017-11-15  Bin Cheng  <bin.cheng@arm.com>

	* tree-predcom.c (add_ref_to_chain): Remove check on distance.

Comments

Jeff Law Nov. 17, 2017, 6:15 p.m. UTC | #1
On 11/17/2017 06:48 AM, Bin Cheng wrote:
> Hi,
> This is an obvious patch removing redundant check on component distance in
> tree-predcom.c  Bootstrap and test along with next patch.  Is it OK?
> 
> Thanks,
> bin
> 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
> 
> 	* tree-predcom.c (add_ref_to_chain): Remove check on distance.
> 
OK
jeff
diff mbox series

Patch

From 8b62802309b2d14a2fca4446b9f6f8f8670a450b Mon Sep 17 00:00:00 2001
From: Bin Cheng <binche01@e108451-lin.cambridge.arm.com>
Date: Fri, 20 Oct 2017 15:56:03 +0100
Subject: [PATCH 1/2] redundant-dist-check-20171102.txt

---
 gcc/tree-predcom.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 747c1b8..499cedb 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -1063,11 +1063,6 @@  add_ref_to_chain (chain_p chain, dref ref)
 
   gcc_assert (wi::les_p (root->offset, ref->offset));
   widest_int dist = ref->offset - root->offset;
-  if (wi::leu_p (MAX_DISTANCE, dist))
-    {
-      free (ref);
-      return;
-    }
   gcc_assert (wi::fits_uhwi_p (dist));
 
   chain->refs.safe_push (ref);
-- 
1.9.1