On 2013-04-25 09:18, Uros Bizjak wrote:
Yes, this patch will work up to building libstdc++, where it will fail with the same reason on movqi pattern (on non-BWX target). I suspect that QImode access is generated during LRA (where reload_in_progress is false!) and it directly generates movqi, which can't use memory operand. Maybe simply adding lra_in_progress to reload_in_progress would fix this problem.
Possibly. I've wondered in the past if it wouldn't be better to spill QI/HImode values in SImode for pre-BWX targets. Back in the day that would have involved hacking reload, but now it would appear that SECONDARY_MEMORY_NEEDED_RTX plus a reload_[qh]i pattern would do the job. Of course, that macro itself is in reload.c... Is there some other way we're supposed to get the same effect from LRA? r~