This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Which of (set (reg:HI) (const_int 0)) and (set (reg:SI) (const_int0)) is cheaper?
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 13 Jun 2003 12:57:35 -0400 (EDT)
- Subject: Which of (set (reg:HI) (const_int 0)) and (set (reg:SI) (const_int0)) is cheaper?
Hi,
How would one know which of
(set (reg:HI) (const_int 0))
and
(set (reg:SI) (const_int 0))
is cheaper? "rtx_cost (const0_rtx, SET)" does not depend on the mode
at all. Should I do something like so?
rtx_cost (gen_rtx_SET (VOIDmode, reg, const0_rtx), ???)
But then I don't know what ??? should be, and various implementations
of TARGET_RTX_COSTS don't seem to tell me the costs of constants in
different modes.
Thanks,
Kazu Hirata