[Bug target/68923] SSE/AVX movq load (_mm_cvtsi64_si128) not being folded into pmovzx

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 16 08:53:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68923

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |uros at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
To match the -O3 -march=haswell code in the combiner we'd need a pattern
matching something like:
(set (reg:V8SI 94)
    (zero_extend:V8SI (vec_select:V8QI (subreg:V16QI (vec_concat:V2DI (mem:DI
(reg/v/f:DI 93 [ p ]) [4 MEM[(uint64_t *)p_2(D)]+0 S8 A64])
                    (const_int 0 [0])) 0)
            (parallel [
                    (const_int 0 [0])
                    (const_int 1 [0x1])
                    (const_int 2 [0x2])
                    (const_int 3 [0x3])
                    (const_int 4 [0x4])
                    (const_int 5 [0x5])
                    (const_int 6 [0x6])
                    (const_int 7 [0x7])
                ]))))
But e.g. for -O2 -mavx2 it is instead:
(set (reg:V8SI 94)
    (zero_extend:V8SI (vec_select:V8QI (subreg:V16QI (vec_merge:V2DI
(vec_duplicate:V2DI (mem:DI (reg/v/f:DI 93 [ p ]) [4 MEM[(uint64_t *)p_2(D)]+0
S8 A64]))
                    (const_vector:V2DI [
                            (const_int 0 [0])
                            (const_int 0 [0])
                        ])
                    (const_int 1 [0x1])) 0)
            (parallel [
                    (const_int 0 [0])
                    (const_int 1 [0x1])
                    (const_int 2 [0x2])
                    (const_int 3 [0x3])
                    (const_int 4 [0x4])
                    (const_int 5 [0x5])
                    (const_int 6 [0x6])
                    (const_int 7 [0x7])
                ]))))


More information about the Gcc-bugs mailing list