------- Additional Comments From kazu at cs dot umass dot edu  2004-10-11 14:47 -------
The combiner does try to combine andl and testb,
but the suggested combined insn is rejected by combine_validate_cost.

The cost of "andl $1, %eax" is 4.
The cost of "testb %al, %al" is 4.
So the original total cost is 8.

The cost of the combined insn, shown below, is 12.

(set (reg:CCZ 17 flags)
    (compare:CCZ (zero_extract:SI (subreg:SI (reg:QI 63) 0)
            (const_int 1 [0x1])
            (const_int 0 [0x0]))
        (const_int 0 [0x0])))

We need to teach ix86_rtx_cost to treat
(compare (zero_extract X (const_1) ...)) the same as and.


-- 


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

Reply via email to