https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114985
--- Comment #6 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- I wonder if something like this would work. diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc index 5781f50..ea8a685 100644 --- a/gcc/ipa-cp.cc +++ b/gcc/ipa-cp.cc @@ -1730,6 +1730,8 @@ ipa_value_range_from_jfunc (vrange &vr, } else { + if (TREE_CODE_CLASS (operation) == tcc_comparison) + vr_type = boolean_type_node; Value_Range op_res (vr_type); Value_Range res (vr_type); tree op = ipa_get_jf_pass_through_operand (jfunc);