[Bug target/103932] x86: strange unoptimized code generated (multiple negations of _mm_testz_si128 result)

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 6 21:25:16 GMT 2022


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
And the reason why the == 0 does not combine (at the RTL level) with the
builtin is because the shift clobbers CC:
(insn 13 12 14 2 (parallel [
            (set (reg:DI 90)
                (ashift:DI (reg:DI 89 [ n ])
                    (const_int 4 [0x4])))
            (clobber (reg:CC 17 flags))
        ]) "/app/example.cpp":58:13 710 {*ashldi3_1}
     (expr_list:REG_DEAD (reg:DI 89 [ n ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))


More information about the Gcc-bugs mailing list