[Bug ipa/106716] Identical Code Folding (-fipa-icf) confuses between functions with different [[likely]] attributes

tomerv at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Aug 23 05:31:45 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106716

--- Comment #2 from Tomer Vromen <tomerv at gmail dot com> ---
IMO, attribute information should be checked in this optimization stage, so
that ipa-icf knows the functions are different. It seems like maybe this is
already partially the behavior - removing the attribute from one of the
functions makes them different again after ipa-icf. Maybe the existence of the
attribute is considered, but not its value? There's some code in
sem_item::compare_referenced_symbol_properties() that looks like it's trying to
do this.


More information about the Gcc-bugs mailing list