This is the mail archive of the
mailing list for the GCC project.
Is there a way to use define_subst when operands need to change modes?
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 02 Mar 2015 15:22:24 +0000
- Subject: Is there a way to use define_subst when operands need to change modes?
- Authentication-results: sourceware.org; auth=none
I'm looking at using the define_subst machinery to auto-generate
versions of some patterns, for example having:
(xor:SI a:SI b:SI))
generate a pattern of the form:
(xor:SI (a:SI b:SI))))
How do I go about achieving this? From the documentation, I think I need
[(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?