* reload1.c (reload_cse_move2add): Honor TRULY_NOOP_TRUNCATION.
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 May 2000 17:13:36 +0000 (17:13 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 May 2000 17:13:36 +0000 (17:13 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34106 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/reload1.c

index 90d37d2..4b1b63d 100644 (file)
@@ -1,3 +1,7 @@
+Tue May 23 18:11:42 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * reload1.c (reload_cse_move2add): Honor TRULY_NOOP_TRUNCATION.
+
 2000-05-23  Jonathan Larmour  <jlarmour@redhat.co.uk>
 
        * config/mips/elf64.h (CTOR_LISTS_DEFINED_EXTERNALLY): Define
index e7da78b..c0bf424 100644 (file)
@@ -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))