https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104982
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by hongtao Liu <liuho...@gcc.gnu.org>: https://gcc.gnu.org/g:919fbffef0755562cd3b686c838069c20bc7878f commit r12-7751-g919fbffef0755562cd3b686c838069c20bc7878f Author: liuhongt <hongtao....@intel.com> Date: Mon Mar 21 20:54:30 2022 +0800 Extend splitter pattern to reversed condition by swapping then and else rtx. [PR target/104982] Failed to match this instruction: (set (reg/v:SI 88 [ z ]) (if_then_else:SI (eq (zero_extract:SI (reg:SI 92) (const_int 1 [0x1]) (zero_extend:SI (subreg:QI (reg:SI 93) 0))) (const_int 0 [0])) (reg:SI 95) (reg:SI 94))) but it's equal to (set (reg/v:SI 88 [ z ]) (if_then_else:SI (ne (zero_extract:SI (reg:SI 92) (const_int 1 [0x1]) (zero_extend:SI (subreg:QI (reg:SI 93) 0))) (const_int 0 [0])) (reg:SI 94) (reg:SI 95))) which is the exact existing splitter. The patch will fix below regressions: On x86-64, r12-7687 caused: FAIL: gcc.target/i386/bt-5.c scan-assembler-not sar[lq][ \t] FAIL: gcc.target/i386/bt-5.c scan-assembler-times bt[lq][ \t] 7 gcc/ChangeLog: PR target/104982 * config/i386/i386.md (*jcc_bt<mode>_mask): Extend the following splitter to reversed condition.