This is the mail archive of the gcc-patches@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]

[fixed-point] Patch to avoid NOP_EXPR when conversions


Hi,

  This patch removes the usage of NOP_EXPR for fixed-point
conversions.  The issue is that optimization phases
may optimize away the saturating flag, if we use NOP_EXPR
to convert a non-saturating type to a saturating type.
So, we always use FIXED_CONVERT_EXPR for conversions to 
avoid the issue.  Thanks a lot!

Regards,
Chao-ying

2007-03-08  Chao-ying Fu  <fu@mips.com>

	* optabs.c (expand_fixed_convert): Emit a move instruction for the
	same machine mode.
	* fold-const.c (fold_convert): Avoid using NOP_EXPR when converting
	to FIXED_POINT_TYPE.
	* convert.c (convert_to_fixed): Avoid using NOP_EXPR when converting
	to FIXED_POINT_TYPE.

Attachment: gcc.diff
Description: gcc.diff


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