On 08/17/2015 04:01 AM, Bin.Cheng wrote:

+      c0 = fold_convert (type, c0);
+      c1 = fold_convert (type, c1);
+
+      if (operand_equal_p (var, c0, 0))

I believe if c0 is not already of type type operand-equal_p will never succeed.
It's quite specific case targeting comparison between var and it's
range bounds.  Given c0 is in form of "var + offc0", then the
comparison "var + offc0 != range bounds" doesn't have any useful
information.  Maybe useless type conversion can be handled here
though, it might be even corner case.
My comment about useless type conversions was more about a deficiency in operand_equal_p's implementation. It wasn't something I felt needed to be addressed in your patch.

I think using operand_equal_p is fine here.


Jeff

Reply via email to