]> gcc.gnu.org Git - gcc.git/commit
i386: Unify {general,timode}_scalar_chain::convert_op [PR111822]
authorUros Bizjak <ubizjak@gmail.com>
Mon, 18 Mar 2024 19:40:29 +0000 (20:40 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Mon, 18 Mar 2024 19:41:30 +0000 (20:41 +0100)
commitb96c5436880d7926299314a33c953171082ab59e
tree4cb133183a3fc2ec48189393038cd0c254062c52
parent3be2b8f475f22c531d6cef1b041c0573b3ea5133
i386: Unify {general,timode}_scalar_chain::convert_op [PR111822]

Recent PR111822 fix implemented REG_EH_REGION note copying to a STV converted
preload instruction in general_scalar_chain::convert_op.  However, the same
issue remains in timode_scalar_chain::convert_op.  Instead of copying the
newly introduced code to timode_scalar_chain::convert_op, the patch unifies
both functions to a common function.

PR target/111822

gcc/ChangeLog:

* config/i386/i386-features.cc (smode_convert_cst): New function
to handle SImode, DImode and TImode immediates, generalized from
timode_convert_cst.
(timode_convert_cst): Remove.
(scalar_chain::convert_op): Unify from
general_scalar_chain::convert_op and timode_scalar_chain::convert_op.
(general_scalar_chain::convert_op): Remove.
(timode_scalar_chain::convert_op): Remove.
(timode_scalar_chain::convert_insn): Update the call to
renamed timode_convert_cst.
* config/i386/i386-features.h (class scalar_chain):
Redeclare convert_op as protected class member.
(class general_calar_chain): Remove convert_op.
(class timode_scalar_chain): Ditto.

gcc/testsuite/ChangeLog:

* g++.target/i386/pr111822.C (dg-do): Compile only for ia32 targets.
(dg-options): Add -march=x86-64.
gcc/config/i386/i386-features.cc
gcc/config/i386/i386-features.h
gcc/testsuite/g++.target/i386/pr111822.C
This page took 0.058359 seconds and 5 git commands to generate.