> > + tree op = ipa_get_jf_pass_through_operand (jfunc); > > + value_range op_vr (op, op); > > + value_range op_res,res; > > + > > Do we really know operation is tcc_binary here? Constant propagation already assumes that at the same spot:
if (TREE_CODE_CLASS (opcode) == tcc_unary) res = fold_unary (opcode, res_type, input); else res = fold_binary (opcode, res_type, input, ipa_get_jf_pass_through_operand (jfunc)); > > > + range_fold_binary_expr (&op_res, operation, operand_type, > > + &src_lats->m_value_range.m_vr, &op_vr); > > + ipa_vr_operation_and_type_effects (&vr, > > + &op_res, > > + NOP_EXPR, param_type, > > + operand_type); > > I hope this one deals with undefined/varying/etc. properly. ipa_vr_operation will return false if result is varying/undefined which I ignore here, but then... > > I'm also worried about types here - but I know too little about > how we construct the jump function to say whether it's OK. > > > + } > > + if (!vr.undefined_p () && !vr.varying_p ()) > > + { > > + if (jfunc->m_vr) > > + { > > + value_range jvr; > > + if (ipa_vr_operation_and_type_effects (&jvr, jfunc->m_vr, > > + NOP_EXPR, > > + param_type, > > + jfunc->m_vr->type ())) > > + vr.intersect (*jfunc->m_vr); > > + } > > + return dest_lat->meet_with (&vr); Return will not happen here and we will end up at the same path as before assuming we know nothing. > > } > > } > > else if (jfunc->type == IPA_JF_CONST) > > > > -- > Richard Biener <rguent...@suse.de> > SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, > Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)