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] |
On 04/06/2013 07:08 AM, Steven Bosscher wrote:
It's not necessary -- the code was templated from an unsubmitted related change to tree-ssa-forwprop where that test is needed. I'll remove it from this change to tree-vrp.c+ if (!SSA_NAME_OCCURS_IN_ABNORMAL_PHI (innerop)) + { + value_range_t *vr = get_value_range (innerop); +I don't think the SSA_NAME_OCCURS_IN_ABNORMAL_PHI test is necessary, get_value_range() will simply return a !VR_RANGE.
+ if (vr->type == VR_RANGE + && operand_equal_p (vr->min, integer_zero_node, 0) + && operand_equal_p (vr->max, integer_one_node, 0)) + {Better use range_int_cst_p(vr) followed by compare_tree_int instead of operand_equal_p IMHO.
Seems reasonable.
Happens via existing machinery. You'll get a Folded into ... message in the detail dumps. The testcase actually checks for this and also verifies the following DCE pass kills the dead code.Print something to dump_file?
jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |