This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: enforcing mode matching in SET



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]