https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122965
--- Comment #2 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- The problem is that for v8.1-m, arm_noce_conversion_profitable ignores the costs for the old and new sequences and assumes that if arm_is_v81m_cond_insn doesn't match that the new sequence must be worse than the old. This was added as part of the fix for PR116444. One solution might be to tweak that code to first check if the new sequence no-longer contains an if_then_else and if so to always check the default cost metric.
