http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273
Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.01.10 18:30:58 CC| |law at redhat dot com Ever Confirmed|0 |1 --- Comment #4 from Jeffrey A. Law <law at redhat dot com> 2011-01-10 18:30:58 UTC --- The issue I see here is IRA decides it is cheaper to allocate "ext" into a call-clobbered register (an asm makes all call-saved registers conflict with the pseudo holding "ext"). So with "ext" in a call-clobbered hard register, caller-saves then realizes the value is live across calls and saves/restores it appropriately. Regardless of whether or not the pseudo is allocated or not to a call clobbered register we're going to be loading it from memory (either the caller-save slot or the constant pool). However, when allocated to a call-clobbered register, we have an extra store (to initialize the caller-save slot) and additional stack space. So in theory we ought to be able to easily determine that allocating a call-clobbered hard reg for this value isn't a win. I'm still poking.