]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/39181 (complex int arguments cause ICE)
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 12 Mar 2009 14:00:21 +0000 (14:00 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Thu, 12 Mar 2009 14:00:21 +0000 (14:00 +0000)
PR target/39181
* config/spu/spu.c (spu_expand_mov): Handle invalid subregs
of non-integer mode as well.

From-SVN: r144811

gcc/ChangeLog
gcc/config/spu/spu.c

index 45380b9acb48e6d7d0b70c1315babe0a37aa4b5d..79aff5dd9e48969d3c989efb4776270875f2a447 100644 (file)
@@ -1,3 +1,9 @@
+2009-03-11  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+       PR target/39181
+       * config/spu/spu.c (spu_expand_mov): Handle invalid subregs
+       of non-integer mode as well.
+
 2009-03-11  Adam Nemet  <anemet@caviumnetworks.com>
 
        * gimplify.c (gimplify_call_expr): Don't set CALL_CANNOT_INLINE_P
index c2fbb331b0a147ce3234fb52b366f3e20c70cc9e..6e0001b0a05a6c0a39215f20728b3f67b2d3e659 100644 (file)
@@ -4114,17 +4114,16 @@ spu_expand_mov (rtx * ops, enum machine_mode mode)
   if (GET_CODE (ops[1]) == SUBREG && !valid_subreg (ops[1]))
     {
       rtx from = SUBREG_REG (ops[1]);
-      enum machine_mode imode = GET_MODE (from);
+      enum machine_mode imode = int_mode_for_mode (GET_MODE (from));
 
       gcc_assert (GET_MODE_CLASS (mode) == MODE_INT
                  && GET_MODE_CLASS (imode) == MODE_INT
                  && subreg_lowpart_p (ops[1]));
 
       if (GET_MODE_SIZE (imode) < 4)
-       {
-         from = gen_rtx_SUBREG (SImode, from, 0);
-         imode = SImode;
-       }
+       imode = SImode;
+      if (imode != GET_MODE (from))
+       from = gen_rtx_SUBREG (imode, from, 0);
 
       if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (imode))
        {