This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/38644] [4.4/4.5/4.6/4.7 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code
- From: "mikpe at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 31 Oct 2011 08:32:09 +0000
- Subject: [Bug rtl-optimization/38644] [4.4/4.5/4.6/4.7 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code
- Auto-submitted: auto-generated
- References: <bug-38644-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644
--- Comment #57 from Mikael Pettersson <mikpe at it dot uu.se> 2011-10-31 08:32:09 UTC ---
(In reply to comment #56)
> (In reply to comment #54)
> > I tested with GCC 4.6.2 and the patch provided by Mikael Pettersson. It works
> > for -march=armv4t and -march=armv5t, but not for -march=armv5te:
> >
>
> Sebastian,
>
> Actually you may try this,
>
> diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
> index aed748c..8269c1a 100755
> --- a/gcc/config/arm/arm.c
> +++ b/gcc/config/arm/arm.c
> @@ -22273,6 +22273,8 @@ thumb1_expand_epilogue (void)
> gcc_assert (amount >= 0);
> if (amount)
> {
> + emit_insn (gen_blockage ());
> +
> if (amount < 512)
> emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
> GEN_INT (amount)));
>
> Thanks,
> -Jiangning
Yeah, that should be even better than my patch. Thanks.