i386 zero_extend patch

Richard Henderson rth@cygnus.com
Tue Nov 30 23:59:00 GMT 1999


On Wed, Nov 24, 1999 at 04:19:48PM +0100, Jan Hubicka wrote:
> ! (define_insn "*zero_extendhisi2_movzwl"
> !   [(set (match_operand:SI 0 "register_operand" "=r")
> !      (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "rm")))]
> !   "!TARGET_ZERO_EXTEND_WITH_AND || optimize_size"
> !   "movz{wl|x}\\t{%1, %0|%0, %1}"
> !   [(set_attr "type" "imovx")])
> ! 
> ! 
> ! 
> ! (define_expand "zero_extendqihi2"

Careful with the extra vspace.

> ! (define_insn "*zero_extendqihi2_movzbw_and"
> !   [(set (match_operand:HI 0 "register_operand" "=r,r")
> !      (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "qm,0")))
> !    (clobber (reg:CC 17))]
> !   "!TARGET_ZERO_EXTEND_WITH_AND || optimize_size"
> !   "#"
> !   [(set_attr "type" "imovx,alu1")])
> ! 
> ! (define_insn "*zero_extendqihi2_movzbw"
> !   [(set (match_operand:HI 0 "register_operand" "=r")
> !      (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "qm")))]
> !   "!TARGET_ZERO_EXTEND_WITH_AND || optimize_size"
> !   "movz{bw|x}\\t{%1, %0|%0, %1}"
> !   [(set_attr "type" "imovx")])

The second pattern can't be matched.  It has the exact same
predicate as the first.

The concept is good though.


r~



More information about the Gcc-patches mailing list