OSDN Git Service

Remove creation of invalid subreg. PR 7705, 7339, 7720.
authordalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Sep 2002 18:54:56 +0000 (18:54 +0000)
committerdalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Sep 2002 18:54:56 +0000 (18:54 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57315 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/combine.c

index 083c12f..9da276c 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-19  Dale Johannesen <dalej@apple.com>
+       * combine.c (make_extraction): Don't create
+       invalid subreg.
+
 2002-09-19  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.c (addr_generation_dependency_p): Handle SUBREG 
index e151881..c72d81e 100644 (file)
@@ -6124,6 +6124,11 @@ make_extraction (mode, inner, pos, pos_rtx, len,
                final_word += (GET_MODE_SIZE (inner_mode)
                               - GET_MODE_SIZE (tmode)) % UNITS_PER_WORD;
 
+             /* Avoid creating invalid subregs, for example when
+                simplifying (x>>32)&255. */
+             if (final_word >= GET_MODE_SIZE (inner_mode))
+               return NULL_RTX;
+
              new = gen_rtx_SUBREG (tmode, inner, final_word);
            }
          else