(convert_modes): Can't truncate REG with gen_lowpart if
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Dec 1993 20:20:44 +0000 (20:20 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Dec 1993 20:20:44 +0000 (20:20 +0000)
TRULY_NOOP_TRUNCATION doesn't allow it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6306 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/expr.c

index ed9f6eb..f31ad28 100644 (file)
@@ -1223,7 +1223,9 @@ convert_modes (mode, oldmode, x, unsignedp)
              || (GET_MODE_SIZE (mode) <= GET_MODE_SIZE (oldmode)
                  && ((GET_CODE (x) == MEM && ! MEM_VOLATILE_P (x)
                       && direct_load[(int) mode])
-                     || GET_CODE (x) == REG)))))
+                     || (GET_CODE (x) == REG
+                         && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
+                                                   GET_MODE_BITSIZE (GET_MODE (x)))))))))
     {
       /* ?? If we don't know OLDMODE, we have to assume here that
         X does not need sign- or zero-extension.   This may not be