expr.c (convert_move): Use GET_MODE_PRECISION instead of bitsize when seeing if trunc...
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Tue, 18 Nov 2003 02:05:29 +0000 (02:05 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 18 Nov 2003 02:05:29 +0000 (21:05 -0500)
* expr.c (convert_move): Use GET_MODE_PRECISION instead of bitsize
when seeing if truncation or extension.

From-SVN: r73689

gcc/ChangeLog
gcc/expr.c

index 77ef7842ef79ddfbf37c01885102d31ffc2b5537..b089988e73f0b2e1762c0dbd2f6561f2cccd3eaa 100644 (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.
index 9424bb9d434a04f22fdea9b16b039738e7b95cef..2d4953f8b1434c7ece6ff9f3ac306aa9fc19e52f 100644 (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 ();