expr.c (convert_move): Use GET_MODE_PRECISION instead of bitsize when seeing if truncation or extension.

* expr.c (convert_move): Use GET_MODE_PRECISION instead of bitsize
	when seeing if truncation or extension.

From-SVN: r73689
This commit is contained in:
Richard Kenner 2003-11-18 02:05:29 +00:00 committed by Richard Kenner
parent ccdf1a46ee
commit e44846d6cc
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2003-11-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (convert_move): Use GET_MODE_PRECISION instead of bitsize
when seeing if truncation or extension.
2003-11-17 Eric Christopher <echristo@redhat.com>
* reload1.c (reload): Fix previous change.

View File

@ -606,9 +606,9 @@ convert_move (rtx to, rtx from, int unsignedp)
rtx value, insns;
convert_optab tab;
if (GET_MODE_BITSIZE (from_mode) < GET_MODE_BITSIZE (to_mode))
if (GET_MODE_PRECISION (from_mode) < GET_MODE_PRECISION (to_mode))
tab = sext_optab;
else if (GET_MODE_BITSIZE (from_mode) > GET_MODE_BITSIZE (to_mode))
else if (GET_MODE_PRECISION (from_mode) > GET_MODE_PRECISION (to_mode))
tab = trunc_optab;
else
abort ();