"Mohamed Shafi" <[EMAIL PROTECTED]> writes:

> I have the following define_insn and define_splt pattern
>
> (define_insn "movhi_const"
>   [(set (match_operand:HI 0 "register_operand"  "=r,r,r,r,r")
>         (match_operand:HI 1 "immediate_operand" "L,K,N,O,i"))]
>  ....
> )
>
> (define_split
>   [(set (match_operand:HI 0 "register_operand"  "")
>         (match_operand:HI 1 "immediate_operand" ""))]
>   "reload_completed"
>   ....
> )
>
> In the define_insn for some alternatives i have '#' and for some i
> have the instruction template.
> But irrespective of whether '#' is present in the output template or
> not all the alternatives are being spilt.
> Should i be having a define_split specific for an alternative or only
> the '#' alternative will be split?

Whether a define_split takes effect is independent of whether the
output template is "#".  Setting the output template to "#" is just a
shorthand way of saying "give an error if this split does not occur."

(There actually is one difference: if the output template is "#" gcc
makes one last attempt to split the insn in the final phase.  You
could write your split predicate such that only that attempt will
succeed.  But it's hard to imagine a good reason to write it that
way.)

Ian

Reply via email to