]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ifcvt.cc: Prevent excessive if-conversion for conditional moves
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Tue, 18 Apr 2023 20:11:09 +0000 (14:11 -0600)
committerJeff Law <jlaw@ventanamicro>
Tue, 18 Apr 2023 20:11:09 +0000 (14:11 -0600)
gcc/
* ifcvt.cc (cond_move_process_if_block): Consider the result of
targetm.noce_conversion_profitable_p() when replacing the original
sequence with the converted one.

gcc/ifcvt.cc

index e4168d95ad9fd158d11226648e7988984a47f963..868eda9325178e70995aff9431aae8459bf11b6a 100644 (file)
@@ -4353,7 +4353,7 @@ cond_move_process_if_block (struct noce_if_info *if_info)
       goto done;
     }
   seq = end_ifcvt_sequence (if_info);
-  if (!seq)
+  if (!seq || !targetm.noce_conversion_profitable_p (seq, if_info))
     goto done;
 
   loc_insn = first_active_insn (then_bb);