https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907
--- Comment #47 from Andrew Macleod <amacleod at redhat dot com> --- (In reply to Andrew Macleod from comment #46) > (In reply to Jan Hubicka from comment #43) > > > // See discussion here: > > > // https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571709.html > > Discussion says: > > > > "Once legacy evrp is removed, this won't be an issue, as ranges in the IL > > will tell the truth. However, this will mean that we will no longer > > remove the first __builtin_unreachable combo. But ISTM, that would be > > correct behavior ??." > > > > So perhaps, we could remove that special case for default def and phi? > > It is an odd thing and we clearly lose info here. > > > > legacy VRP has been removed now. So in theory we are free to do as we > want.. but I don't remember the specific details. > > So do you just want to always use get_range_global() ? and not do the check? > > I can try changing it to just get_global and see what happens. FWIW, diff --git a/gcc/value-query.cc b/gcc/value-query.cc index 040c843c566..0ab10bc5a46 100644 --- a/gcc/value-query.cc +++ b/gcc/value-query.cc @@ -353,16 +353,9 @@ get_range_global (vrange &r, tree name, struct function *fun = cfun) void gimple_range_global (vrange &r, tree name, struct function *fun) { - tree type = TREE_TYPE (name); gcc_checking_assert (TREE_CODE (name) == SSA_NAME); - if (SSA_NAME_IS_DEFAULT_DEF (name) || (fun && fun->after_inlining) - || is_a<gphi *> (SSA_NAME_DEF_STMT (name))) - { - get_range_global (r, name, fun); - return; - } - r.set_varying (type); + get_range_global (r, name, fun); } bootstraps and runs the testsuites clean on x86-64 now...