This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: enforcing mode matching in SET
- To: jfc at tiac dot net
- Subject: Re: enforcing mode matching in SET
- From: "David S. Miller" <davem at dm dot cobaltmicro dot com>
- Date: Wed, 12 Aug 1998 21:21:12 -0700
- CC: egcs at cygnus dot com, wilson at cygnus dot com, rth at cygnus dot com, amylaar at cygnus dot com
- References: <199808122335.TAA08324@pc.>
Does this mean I should be writing explicit truncations inside
patterns for things such as:
(set (match_operand:SI 0 "register_operand" "=&r")
(ne:DI (match_operand:DI 1 "register_operand" "r")
(const_int 0)))
This doesn't make any sense to me in these particular kinds of cases
and from my testing the compiler groks this and what is going on just
fine. Logically the result of a comparison is a boolean (or rather,
somthing like STORE_FLAG_VALUE) which can have arbitrary mode for it's
result, what matters is the mode used wrt. to the items being
compared. Anyways, so my question is should I code this as:
(set (match_operand:SI 0 "register_operand" "=&r")
(truncate:SI (ne:DI (match_operand:DI 1 "register_operand" "r")
(const_int 0))))
If so I'll do the Sparc fixes after I finish up some other bug hunting
in the new Sparc backend.
Later,
David S. Miller
davem@dm.cobaltmicro.com