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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crazylht at gmail dot com

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note while on the GCC 14 branch with the fix as posted I see the correct

        movl    $-128, %eax
        vpxor   %xmm2, %xmm2, %xmm2
        kxorb   %k4, %k4, %k4
        kmovb   %eax, %k1
        vmovdqu64       KingSafetyMask1-56(%rip), %zmm0{%k1}{z}
        vmovdqu64       KingSafetyMask1-48(%rip), %zmm1{%k1}{z}
        movl    $64, %eax
        kmovb   %eax, %k2
..

oddly enough on trunk while there's

(insn 5 26 76 2 (set (reg:QI 4 si [orig:113 loop_mask_57 ] [113])
        (const_int -128 [0xffffffffffffff80])) "t.c":6:1 91 {*movqi_internal}
     (expr_list:REG_EQUAL (const_int -128 [0xffffffffffffff80])
        (nil)))
(insn:TI 76 5 92 2 (set (reg:QI 73 k5 [orig:113 loop_mask_57 ] [113])
        (reg:QI 4 si [orig:113 loop_mask_57 ] [113])) "t.c":6:1 91
{*movqi_internal}
     (expr_list:REG_DEAD (reg:QI 4 si [orig:113 loop_mask_57 ] [113])
        (nil)))

in .dfinish there's

        movl    $-128, %esi
        kmovw   %esi, %k5

in the assembly and we leak extra set bits into %k5.  I have a debug patch
which then causes the testcase to fail again on trunk but not on the branch.
How do we end up with kmovw from the above insns?  It looks like
*movqi_internal might benefit from the new [] syntax - maybe
alternatives/attributes got mixed up?

Reply via email to