aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-12-24 12:20:44 -0800
committerJim Wilson <wilson@gcc.gnu.org>1993-12-24 12:20:44 -0800
commit2bf29316da96818c2db73220318bce5679431c98 (patch)
tree1fdf290899fe18dd7f7ef90b3f82326fae382c3d
parent443332237923d52fde2cea17df1d57594c1577c2 (diff)
downloadgcc-2bf29316da96818c2db73220318bce5679431c98.zip
gcc-2bf29316da96818c2db73220318bce5679431c98.tar.gz
gcc-2bf29316da96818c2db73220318bce5679431c98.tar.bz2
(convert_modes): Can't truncate REG with gen_lowpart if
TRULY_NOOP_TRUNCATION doesn't allow it. From-SVN: r6306
-rw-r--r--gcc/expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index ed9f6eb..f31ad28 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -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