From a3afe9205d962176ddc12f507072273d8629de90 Mon Sep 17 00:00:00 2001 From: "J\"orn Rennecke" Date: Tue, 23 May 2000 17:13:36 +0000 Subject: [PATCH] * reload1.c (reload_cse_move2add): Honor TRULY_NOOP_TRUNCATION. From-SVN: r34106 --- gcc/ChangeLog | 4 ++++ gcc/reload1.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90d37d2b7fe..4b1b63d5679 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Tue May 23 18:11:42 2000 J"orn Rennecke + + * reload1.c (reload_cse_move2add): Honor TRULY_NOOP_TRUNCATION. + 2000-05-23 Jonathan Larmour * config/mips/elf64.h (CTOR_LISTS_DEFINED_EXTERNALLY): Define diff --git a/gcc/reload1.c b/gcc/reload1.c index e7da78b8a03..c0bf424a87f 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -8905,8 +8905,12 @@ reload_cse_move2add (first) /* ??? We don't know how zero / sign extension is handled, hence we can't go from a narrower to a wider mode. */ if (reg_set_luid[regno] > last_label_luid - && (GET_MODE_SIZE (GET_MODE (reg)) - <= GET_MODE_SIZE (reg_mode[regno])) + && ((GET_MODE_SIZE (GET_MODE (reg)) + == GET_MODE_SIZE (reg_mode[regno])) + || ((GET_MODE_SIZE (GET_MODE (reg)) + <= GET_MODE_SIZE (reg_mode[regno])) + && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (GET_MODE (reg)), + GET_MODE_BITSIZE (reg_mode[regno])))) && GET_CODE (reg_offset[regno]) == CONST_INT) { /* Try to transform (set (REGX) (CONST_INT A)) -- 2.30.2