diff mbox series

arm: Make arm_noce_conversion_profitable_p call default hook [PR 116444]

Message ID 2f10481d-0beb-4cc8-9230-610de2a76937@arm.com
State New
Headers show
Series arm: Make arm_noce_conversion_profitable_p call default hook [PR 116444] | expand

Commit Message

Andre Vieira (lists) Oct. 4, 2024, 3:55 p.m. UTC
Hi,

The patch for 'arm: Fix missed CE optimization for armv8.1-m.main [PR 
116444]' introduced regressions with arm targets that used 'noce' before.
This is because it would approve all noce optimisations without using 
the default cost check. Not sure why this didn't show up in my original 
testing, I suspect you need to test this for a set of specific targets 
like Torbjorn did, thank you for pointing these issues out to me.

Could I ask you to rerun them with this patch? I'll try to do that 
locally too.

Happy to receive reviews, but I'm waiting for Torbjorn and my own 
testing to complete before committing.

When not dealing with the special armv8.1-m.main conditional 
instructions case
make sure it uses the default_noce_conversion_profitable_p call to determine
whether the sequence is cost effective.

gcc/ChangeLog:


	PR target/116444
	* config/arm/arm.cc (arm_noce_conversion_profitable_p): Call
	default_noce_conversion_profitable_p when not dealing with the
	armv8.1-m.main conditional instructions special cases.
diff mbox series

Patch

diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index 077c80df4482d168d9694795be68c2eeb8f304d9..fd437f428781673e1d44498d31a47f174e0f57fa 100644
--- a/gcc/config/arm/arm.cc
+++ b/gcc/config/arm/arm.cc
@@ -36168,7 +36168,7 @@  arm_noce_conversion_profitable_p (rtx_insn *seq, struct noce_if_info *if_info)
 {
   if (!TARGET_COND_ARITH
       || reload_completed)
-    return true;
+    return default_noce_conversion_profitable_p (seq, if_info);
 
   if (arm_is_v81m_cond_insn (seq))
     return true;