[IPCP] Remove unreachable code

kugan kugan.vivekanandarajah@linaro.org
Mon Oct 24 22:47:00 GMT 2016


Hi,

I noticed that in ipcp_bits_lattice::meet_with we have:

   else if (TREE_CODE_CLASS (code) == tcc_unary)
   ....
   else if (code == NOP_EXPR)
   ....

Since TREE_CODE_CLASS for NOP_EXPR is tcc_unary, if (code == NOP_EXPR) 
is unreachable and therefore removing it. I also don't think that we 
need any special casing for NOP_EXPR here. bit_value_unop handles 
already handles CASE_CONVERT.

Is this OK if no regressions in bootstrap and regression testing.

Thanks,
Kugan




gcc/ChangeLog:

2016-10-25  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* ipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code.
-------------- next part --------------
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 1dc5cb6..527ff27 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1070,12 +1070,6 @@ ipcp_bits_lattice::meet_with (ipcp_bits_lattice& other, unsigned precision,
 	return set_to_bottom ();
     }
 
-  else if (code == NOP_EXPR)
-    {
-      adjusted_value = other.m_value;
-      adjusted_mask = other.m_mask;
-    }
-
   else
     return set_to_bottom ();
 


More information about the Gcc-patches mailing list