]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/31876 (SH: ICE in gen_lowpart_general, at rtlhooks.c:59)
authorKaz Kojima <kkojima@gcc.gnu.org>
Fri, 11 May 2007 04:53:19 +0000 (04:53 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Fri, 11 May 2007 04:53:19 +0000 (04:53 +0000)
PR target/31876
* config/sh/sh.md (andsi3): Avoid calling gen_lowpart on
        a SImode SUBREG of a floating point register.

From-SVN: r124611

gcc/ChangeLog
gcc/config/sh/sh.md

index 0c07567e43f988d44955de9ad78d3d06ca22f72e..bc4ffaaaebbc9e385e8da68193961ffdea6af937 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-11  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       PR target/31876
+       * config/sh/sh.md (andsi3): Avoid calling gen_lowpart on
+        a SImode SUBREG of a floating point register.
+
 2007-05-08  Andreas Krebbel  <krebbel1@de.ibm.com>
 
        * loop.c (move_movables): Remove REG_EQUAL notes for conditional
index f4e13c34115268dda3414804601783c1d11f90a7..2d3f2eb8ccc59849b14aaf13b617677dc9ed9a28 100644 (file)
@@ -3018,7 +3018,9 @@ label:
   "
 {
   if (TARGET_SH1
-      && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 255)
+      && GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 255
+      && (GET_CODE (operands[1]) != SUBREG
+         || SCALAR_INT_MODE_P (GET_MODE (XEXP (operands[1], 0)))))
     {
       emit_insn (gen_zero_extendqisi2 (operands[0],
                                       gen_lowpart (QImode, operands[1])));