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/ Cheers, Oleg