On Wed, 02 Nov 2022 08:06:36 PDT (-0700), j...@ventanamicro.com wrote:
On 11/2/22 07:54, Manolis Tsamis wrote:
I've revisited this testcase and I think it's not possible to make it
work with the current implementation.
It's not possible to trigger shrink wrapping in this case since the
wrapping of registers is guarded by
if (SMALL_OPERAND (offset)) { bitmap_set_bit (components, regno); }
Hence if a long stack is generated we get no shrink wrapping.
Ah, sorry, I must have just missed that when reading the code. In that
case we're essentailly just doing what the other port was, so we're
safe.
I also tried to remove that restriction but it looks like it can't
work because we can't create
pseudo-registers during shrink wrapping and shrink wrapping can't work either.
I believe this means that shrink wrapping cannot interfere with a long
stack frame
so there is nothing to test against in this case?
It'd be marginally better to have such a test case to ensure we don't
shrink wrap it -- that would ensure that someone doesn't accidentally
introduce shrink wrapping with large offsets. Just a bit of future
proofing.
If there's passing test cases that fail with that check removed then
it's probably good enough, though I think in this case just having a
comment there saying why the short-stack check is necessary should be
fine.