Hi all,

I'm looking at using the define_subst machinery to auto-generate zero-extended
versions of some patterns, for example having:
(set reg:SI
     (xor:SI a:SI b:SI))

generate a pattern of the form:
(set reg:DI
     (zero_extend:DI
       (xor:SI (a:SI b:SI))))

How do I go about achieving this? From the documentation, I think I need something like:
     (define_subst "add_z_extend"
       [(set (match_operand:SI 0 "" "")
             (match_operand:SI 1 "" ""))]
       ""
       [(set (match_dup 0)
             (zero_extend:DI (match_dup 1)))]

but in the resultant pattern I need operand 0 to be tranfsormed into DImode.
Is there a way to write that?

Thanks,
Kyrill


Reply via email to