[llvm] [Thumb1] Resolve FIXME: use 'mov hi, $src; mov $dst, hi' (PR #81908)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 16:41:55 PST 2024


AtariDreams wrote:

> For r10 and r11, as the tests show, they're almost never available; the compiler won't naturally spill them. You can force them to spill using inline asm, but that's so rare it's not really relevant. So I don't really see the point of checking, unless you're planning some sort of followup.
> 
> For r12... this is probably okay? We don't use r12 in the scavenger anymore (see [ab1d73e](https://github.com/llvm/llvm-project/commit/ab1d73ee32481e3033ebbe5a68afafb24da3df2e)). We still use R12 as a scratch register in a few different places, but not in a way that would conflict, I think. It would be helpful if you could take some time to verify that.
> 
> If there's some way r12 can actually be live (inline asm?), we should make sure there's at least one test that actually still exercises the code to generate push/pop.

I think it is best to delegate this to find the first high register available rather than always go with r12 though maybe I should do r12 always 

https://github.com/llvm/llvm-project/pull/81908


More information about the llvm-commits mailing list