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]
Other format: [Raw text]

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


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