This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, SH4] Fix PR58314 (unsatisfied constraints)
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: Christian Bruel <christian dot bruel at st dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Fri, 13 Sep 2013 00:25:07 +0200
- Subject: Re: [PATCH, SH4] Fix PR58314 (unsatisfied constraints)
- Authentication-results: sourceware.org; auth=none
- References: <5231C3AB dot 3040401 at st dot com>
On Thu, 2013-09-12 at 15:37 +0200, Christian Bruel wrote:
> The attached patch fixes an ice while building the linux kernel. Reduced
> in the included testcase.
> The problem is that we are generating a movhi_reg_reg insn that accepts
> only registers as operands. Spilling a pseudo on the stack results in an
> invalid memory load/store constraints.
> The attached patch allows memory for reload.
> Tested with the testsuite on sh4-linux and sh-superh-gcc.
> No performance impact on a large number of benchmarks (EEMBC, CSIBe,
> spec2006, ...)
> Oleg, since you moved out the r,r constraints from *mohi into
> movhi_reg_reg, do you agree ?
Yep. Just a few nits:
- the comment block above the "*mov<mode>_reg_reg" pattern is partially
invalidated by your fix and should be updated, too.
- although the original failure popped up with -Os, I think the test
should go into gcc/testsuite/gcc.target/sh/torture/