This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/17935] Two consecutive movzbl are generated



------- Comment #8 from pinskia at gcc dot gnu dot org  2006-01-18 05:07 -------
We get now:
        movb    (%eax), %al
        andl    $1, %eax
        xorl    $1, %eax
        andl    $1, %eax
        ret

(insn 23 22 24 4 (parallel [
            (set (reg:QI 63)
                (and:QI (mem/s:QI (reg/v/f:SI 61 [ q ]) [0 S1 A32])
                    (const_int 1 [0x1])))
            (clobber (reg:CC 17 flags))
        ]) 212 {*andqi_1} (nil)
    (expr_list:REG_DEAD (reg/v/f:SI 61 [ q ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))

(insn 24 23 25 4 (parallel [
            (set (reg:QI 64)
                (xor:QI (reg:QI 63)
                    (const_int 1 [0x1])))
            (clobber (reg:CC 17 flags))
        ]) 241 {*xorqi_1} (insn_list:REG_DEP_TRUE 23 (nil))
    (expr_list:REG_DEAD (reg:QI 63)
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))

(note 25 24 26 4 NOTE_INSN_DELETED)

(insn 26 25 27 4 (parallel [
            (set (reg:SI 58 [ prephitmp.25 ])
                (and:SI (subreg:SI (reg:QI 64) 0)
                    (const_int 1 [0x1])))
            (clobber (reg:CC 17 flags))
        ]) 208 {*andsi_1} (insn_list:REG_DEP_TRUE 24 (nil))
    (expr_list:REG_DEAD (reg:QI 64)
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))

We must lose that (a&1)^1 has only the the one bit set.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17935


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]