]> git.ipfire.org Git - thirdparty/gcc.git/commit
x86: Add debug dump for the remove_redundant_vector pass
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 10 May 2025 08:57:58 +0000 (16:57 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 25 Jun 2025 22:20:57 +0000 (06:20 +0800)
commitb8b08a8514003280050003d6d56657cb1b71fb88
treeeb882b3dccf6e46845941d9a2219ea7d315d3458
parent5fd8f336f17067fa3ae25eb69f50ca45171ceec8
x86: Add debug dump for the remove_redundant_vector pass

Add debug dump for the remove_redundant_vector pass with the following
output:

Replace:

(insn 7 4 8 2 (set (reg:V2DI 103)
        (const_vector:V2DI [
                (const_int 0 [0]) repeated x2
            ])) "x.c":8:13 2406 {movv2di_internal}
     (nil))

with:

(insn 7 4 8 2 (set (reg:V2DI 103)
        (subreg:V2DI (reg:V32QI 109) 0)) "x.c":8:13 2406 {movv2di_internal}
     (nil))

...

Replace:

(insn 16 15 17 3 (set (reg:V4DI 105)
        (const_vector:V4DI [
                (const_int 0 [0]) repeated x4
            ])) "x.c":13:28 2405 {movv4di_internal}
     (nil))

with:

(insn 16 15 17 3 (set (reg:V4DI 105)
        (subreg:V4DI (reg:V32QI 109) 0)) "x.c":13:28 2405 {movv4di_internal}
     (nil))

...

Place:

(insn 25 5 23 2 (set (reg:V32QI 109)
        (const_vector:V32QI [
                (const_int 0 [0]) repeated x32
            ])) -1
     (nil))

after:

(insn 23 25 24 2 (set (reg/f:DI 107 [ mem1 ])
        (reg:DI 5 di [ mem1 ])) "x.c":5:1 95 {*movdi_internal}
     (expr_list:REG_DEAD (reg:DI 5 di [ mem1 ])
        (nil)))

in the *.309r.rrvl debug dump.

* config/i386/i386-features.cc (ix86_place_single_vector_set):
Add debug dump.
(replace_vector_const): Likewise.
(remove_redundant_vector_load): Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
gcc/config/i386/i386-features.cc