diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2023-11-16 18:07:36 +0100 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2023-11-16 19:10:21 +0100 |
commit | 8ebc7e0b0ddf4679cf09ed6836fac30ca01d3ba0 (patch) | |
tree | 107c108a0bca7e99af30d02d5c95898d8c958e4e /gcc/analyzer/program-state.cc | |
parent | d2934eb6ae92471484469d8ddd039eb34ef400b1 (diff) | |
download | gcc-8ebc7e0b0ddf4679cf09ed6836fac30ca01d3ba0.zip gcc-8ebc7e0b0ddf4679cf09ed6836fac30ca01d3ba0.tar.gz gcc-8ebc7e0b0ddf4679cf09ed6836fac30ca01d3ba0.tar.bz2 |
i386: Optimize QImode insn with high input registers
Sometimes the compiler emits the following code with <insn>qi_ext<mode>_0:
shrl $8, %eax
addb %bh, %al
Patch introduces new low part QImode insn patterns with both of
their input arguments extracted from high register. This invalid
insn is split after reload to a move from the high register
and <insn>qi_ext<mode>_0 instruction. The combine pass is able to
convert shift to zero/sign-extract sub-RTX, which we split to the
optimal:
movzbl %bh, %edx
addb %ah, %dl
PR target/78904
gcc/ChangeLog:
* config/i386/i386.md (*addqi_ext2<mode>_0):
New define_insn_and_split pattern.
(*subqi_ext2<mode>_0): Ditto.
(*<code>qi_ext2<mode>_0): Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr78904-10.c: New test.
* gcc.target/i386/pr78904-10a.c: New test.
* gcc.target/i386/pr78904-10b.c: New test.
Diffstat (limited to 'gcc/analyzer/program-state.cc')
0 files changed, 0 insertions, 0 deletions