This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR tree-optimization/43833


On 04/21/2010 04:46 PM, Jie Zhang wrote:
+      bool vr0_constant_p, vr1_constant_p;
+
+      vr0_constant_p = (vr0.type == VR_RANGE
+			&&  vr0.min == vr0.max

operand_equal_p (vr0.min, vr0.max, 0)


+ && TREE_CODE (vr0.max) == INTEGER_CST

This check then becomes cheaper than operand_equal_p, so do it first.


+			&&  !TREE_OVERFLOW (vr0.max));
+      vr1_constant_p = (vr1.type == VR_RANGE
+			&&  vr1.min == vr1.max
+			&&  TREE_CODE (vr1.max) == INTEGER_CST
+			&&  !TREE_OVERFLOW (vr1.max));
+
+      if (vr0_constant_p&&  vr1_constant_p)

I also looked at op_with_constant_singleton_value_range while reviewing this patch, and noticed it lacks the !TREE_OVERFLOW check. Maybe you can introduce range_single_constant_value, and use it also in op_with_constant_singleton_value_range?


Thanks,

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]