This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch committed] Fix PR target/31876


Hi,

I've applied the attached patch on 4.1 branch to fix PR target/31876
which is a 4.1 regression from 4.0.  It's tested with bootstrap and
the top level "make -k check" on sh4-unknown-linux-gnu with no new
failures.

Regards,
	kaz
--
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.

--- ORIG/gcc-4_1-branch/gcc/config/sh/sh.md	2006-06-22 12:53:20.000000000 +0900
+++ LOCAL/gcc-4_1-branch/gcc/config/sh/sh.md	2007-05-10 08:28:35.000000000 +0900
@@ -3018,7 +3020,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])));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]