[Bug tree-optimization/108166] [12/13 Regression] Wrong code with -O2 since r12-8078-ga42aa68bf1ad745a
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 21 13:35:24 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108166
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 54142
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54142&action=edit
gcc13-pr108166.patch
Untested fix. I wouldn't change replace_phi_edge_with_variable, because even
without the duplicate_ssa_name_range_info (say if new_tree already has
SSA_NAME_RANGE_INFO) we'd be lying to the compiler.
The right thing would be to union the global range of the phi result with the
oarg INTEGER_CST, not sure how hard would that be.
More information about the Gcc-bugs
mailing list