Skip to content

Commit cc51567

Browse files
committed
ifcvt: Allow non-comparisons against 0 in noce_try_cond_zero_arith
Like r16-6332-g2a84a753afcf37 but instead of just allowing any comparisons against 0, this allows all comparisons. I mentioned this in https://gcc.gnu.org/pipermail/gcc-patches/2025-December/704463.html. gcc/ChangeLog: * ifcvt.cc (noce_try_cond_zero_arith): Remove restriction on comparison against 0. Signed-off-by: Andrew Pinski <[email protected]>
1 parent 92f2a86 commit cc51567

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

gcc/ifcvt.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3157,9 +3157,6 @@ noce_try_cond_zero_arith (struct noce_if_info *if_info)
31573157
if (!noce_simple_bbs (if_info))
31583158
return false;
31593159

3160-
if (!REG_P (XEXP (cond, 0)) || !rtx_equal_p (XEXP (cond, 1), const0_rtx))
3161-
return false;
3162-
31633160
a = copy_rtx (if_info->a);
31643161
b = copy_rtx (if_info->b);
31653162

0 commit comments

Comments
 (0)