[fixed-point] Patch to avoid NOP_EXPR when conversions

Fu, Chao-Ying fu@mips.com
Thu Mar 8 23:00:00 GMT 2007


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc.diff
Type: application/octet-stream
Size: 1498 bytes
Desc: gcc.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070308/c817e998/attachment.obj>


More information about the Gcc-patches mailing list