This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Combine deletes non noop insns
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: rth at redhat dot com (Richard Henderson)
- Cc: law at redhat dot com, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Sep 2002 22:47:35 -0400 (EDT)
- Subject: Re: Combine deletes non noop insns
> On Tue, Sep 10, 2002 at 01:18:17PM -0600, Jeff Law wrote:
> > >This seems odd to me. Inserting data into the ignored
> > >portion of a paradoxical subreg?
> > Regardless, we shouldn't have zapped the following store (insn 43),
> > at least that's the way it looks from the information John posted.
>
> Yes, we could, if combine proves that reg 125 is unchanged
> from when it was loaded.
Problem fixed. Tested on hppa-linux and applied to main. The patch
is similar to one applied by Joern on July 22.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2002-09-10 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.md (extzv): Check predicates before emitting extzv_32.
(insv): Likewise.
Index: config/pa/pa.md
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/pa/pa.md,v
retrieving revision 1.112
diff -u -3 -p -r1.112 pa.md
--- config/pa/pa.md 9 Sep 2002 21:34:48 -0000 1.112
+++ config/pa/pa.md 10 Sep 2002 22:42:07 -0000
@@ -6621,8 +6621,13 @@
emit_insn (gen_extzv_64 (operands[0], operands[1],
operands[2], operands[3]));
else
- emit_insn (gen_extzv_32 (operands[0], operands[1],
- operands[2], operands[3]));
+ {
+ if (! uint5_operand (operands[2], SImode)
+ || ! uint5_operand (operands[3], SImode))
+ FAIL;
+ emit_insn (gen_extzv_32 (operands[0], operands[1],
+ operands[2], operands[3]));
+ }
DONE;
}")
@@ -6741,8 +6746,13 @@
emit_insn (gen_insv_64 (operands[0], operands[1],
operands[2], operands[3]));
else
- emit_insn (gen_insv_32 (operands[0], operands[1],
- operands[2], operands[3]));
+ {
+ if (! uint5_operand (operands[2], SImode)
+ || ! uint5_operand (operands[3], SImode))
+ FAIL;
+ emit_insn (gen_insv_32 (operands[0], operands[1],
+ operands[2], operands[3]));
+ }
DONE;
}")