This removes many re-initializations of a base register to 0.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
The computation of NewOffset should be shared between the load and store paths.
I guess changing the MachineInstr could also be shared using MachineInstr::RemoveOperand, but the resulting code might not be much cleaner.
The rest looks good to me.
Comment Actions
Ma original plan was to just re-use buildScratchLoadStore which is what D24630 was for, but that changes from scavenging a VGPR to an SGPR and I wasn't sure what the consequences of that might be