Hi Honza,

This is an alternative patch  ICE with  speculative edges are not adjacent.

The root cause of this failure is the addition of speculative edges
without verifying if they are already speculative in IPA-devirt pass. Since
Profile-Guided Optimization (PGO) already disables
flag_devirtualize_speculatively, the most stable fix for the current
stage of GCC development is to adopt the same approach and disable
the flags.

This issue is reproducible during an autoprofile bootstrap of GCC.
The patch has been validated through bootstrap and regression testing
on aarch64-gnu-linux.

Is this acceptable for trunk?

gcc/ChangeLog:

2026-01-05  Kugan Vivekanandarajah  <[email protected]>

        * opts.cc (common_handle_option): Unset flag_devirtualize_speculatively
        and flag_speculatively_call_stored_functions for AutoFDO
        like done in PGO.



Thanks,
Kugan




Attachment: 0001-AutoFDO-Unset-flag_devirtualize_speculatively-and-fl.patch
Description: 0001-AutoFDO-Unset-flag_devirtualize_speculatively-and-fl.patch

Reply via email to