]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Promote {QI,HI}mode x86_mov<mode>cc_0_m1_neg to SImode
authorUros Bizjak <ubizjak@gmail.com>
Mon, 8 Jul 2024 18:47:52 +0000 (20:47 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Mon, 8 Jul 2024 20:39:59 +0000 (22:39 +0200)
commit2b3027bea3f218599d36379d3d593841df7a1559
treee23bfba11c944ea53db50c95af7bf68b7efdc48f
parent40d234dd6439e8c8cfbf3f375a61906aed35c80d
i386: Promote {QI,HI}mode x86_mov<mode>cc_0_m1_neg to SImode

Promote HImode x86_mov<mode>cc_0_m1_neg insn to SImode to avoid
redundant prefixes. Also promote QImode insn when TARGET_PROMOTE_QImode
is set. This is similar to promotable_binary_operator splitter, where we
promote the result to SImode.

Also correct insn condition for splitters to SImode of NEG and NOT
instructions. The sizes of QImode and SImode instructions are always
the same, so there is no need for optimize_insn_for_size bypass.

gcc/ChangeLog:

* config/i386/i386.md (x86_mov<mode>cc_0_m1_neg splitter to SImode):
New splitter.
(NEG and NOT splitter to SImode): Remove optimize_insn_for_size_p
predicate from insn condition.
gcc/config/i386/i386.md