Re:Addressing Criticism of RISC-V Microprocessors
by avianes on Monday March 21, 2022 @09:27AM
(#30753851)
We don't need indexed loads only for loops.
But even within loops, you may need indexed load.
One simple example: when you do loop unrolling, you must access elements n+4, n+8 and n+12 etc.
I'm surprised that it wasn't pointed out that this should probably be eliminated by a compiler transformation. Rather than loading from r0+r1<<2 and incrementing r1 by one every loop iteration, surely it might be possible to load from just r0 and increment it by 4 every loop iteration?