[Bug tree-optimization/126537] [14/15/16/17 Regression] wrong code with PHI group analyzer
amacleod at redhat dot com
gcc-bugzilla@gcc.gnu.org
Wed Aug 19 01:17:02 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126537
--- Comment #2 from Andrew Macleod <amacleod at redhat dot com> ---
I think this was fixed by
commit 6cda72b8bd646c32a691ae1424387da259f61edc
Author: Aldy Hernandez <aldy@quesejoda.com>
Date: Thu Aug 13 07:00:26 2026 +0000
range: remove the abnormal-PHI restriction from gimple_range_ssa_p
The ranger has refused to look at SSA names occurring in abnormal
PHIs since r12-4443-g93ac832f1846e4, but there is no reason range
analysis cannot handle them. The abnormal marker is a constraint on
transformations, not on analysis: no copy can be inserted on an
abnormal edge, so the incoming value and the PHI result must
coalesce. Analysis learns nothing from conditions on abnormal edges
(there are none), but PHI and copy semantics hold like anywhere else.
Tested on ppc64le Linux.
gcc/ChangeLog:
* gimple-range-fold.h (gimple_range_ssa_p): Remove the
SSA_NAME_OCCURS_IN_ABNORMAL_PHI check.
* gimple-range-path.cc (path_range_query::ssa_range_in_phi):
Assert the incoming path edge is not abnormal.
More information about the Gcc-bugs
mailing list