]> gcc.gnu.org Git - gcc.git/commit
i386[stv]: Handle REG_EH_REGION note
authorliuhongt <hongtao.liu@intel.com>
Wed, 13 Mar 2024 02:40:01 +0000 (10:40 +0800)
committerliuhongt <hongtao.liu@intel.com>
Thu, 14 Mar 2024 07:55:15 +0000 (15:55 +0800)
commit618e34d56cc38e9c3ae95a413228068e53ed76bb
tree10cf6fe3177b50bb81a50c6890b76ed0f8908e78
parent746b71e26bd43366297f3e9f2f7d5f782c30622e
i386[stv]: Handle REG_EH_REGION note

When we split
(insn 37 36 38 10 (set (reg:DI 104 [ _18 ])
        (mem:DI (reg/f:SI 98 [ CallNative_nclosure.0_1 ]) [6 MEM[(struct SQRefCounted *)CallNative_nclosure.0_1]._uiRef+0 S8 A32])) "test.C":22:42 84 {*movdi_internal}
     (expr_list:REG_EH_REGION (const_int -11 [0xfffffffffffffff5])

into

(insn 104 36 37 10 (set (subreg:V2DI (reg:DI 124) 0)
        (vec_concat:V2DI (mem:DI (reg/f:SI 98 [ CallNative_nclosure.0_1 ]) [6 MEM[(struct SQRefCounted *)CallNative_nclosure.0_1]._uiRef+0 S8 A32])
            (const_int 0 [0]))) "test.C":22:42 -1
        (nil)))
(insn 37 104 105 10 (set (subreg:V2DI (reg:DI 104 [ _18 ]) 0)
        (subreg:V2DI (reg:DI 124) 0)) "test.C":22:42 2024 {movv2di_internal}
     (expr_list:REG_EH_REGION (const_int -11 [0xfffffffffffffff5])
        (nil)))

we must copy the REG_EH_REGION note to the first insn and split the block
after the newly added insn.  The REG_EH_REGION on the second insn will be
removed later since it no longer traps.

gcc/ChangeLog:

* config/i386/i386-features.cc
(general_scalar_chain::convert_op): Handle REG_EH_REGION note.
(convert_scalars_to_vector): Ditto.
* config/i386/i386-features.h (class scalar_chain): New
memeber control_flow_insns.

gcc/testsuite/ChangeLog:

* g++.target/i386/pr111822.C: New test.
gcc/config/i386/i386-features.cc
gcc/config/i386/i386-features.h
gcc/testsuite/g++.target/i386/pr111822.C [new file with mode: 0644]
This page took 0.060355 seconds and 5 git commands to generate.