On 10/10/2023 20:09, Segher Boessenkool wrote:
Hi Andrew,
On Tue, Oct 10, 2023 at 04:11:18PM +0100, Andrew Stubbs wrote:
I'm also seeing wrong-code bugs when I allow more than 32 new registers,
but that might be an unrelated problem. Or the allocation is broken? I'm
still analyzing this.
It could be connected. both things should not happen.
This is now confirmed to be unrelated: the instruction moving values
from the new registers to the old must be followed by a no-op in certain
instruction combinations due to GCN having only partial hardware
dependency detection.
The register allocation is therefore valid (at least in the testcases
I've been looking at).
The question of why it prefers registers with round numbers remains open
(and important for optimization reasons).
Andrew