This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch committed] Fix PR target/31876
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 11 May 2007 13:54:29 +0900 (JST)
- Subject: [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])));