This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Improvement of emitMemMemWrapper()
ClosedPublic

Authored by jonpa on Oct 19 2021, 4:35 AM.

Details

Summary

It was discovered that an extra register COPY remained when expanding a (var-len) memory operation with a loop and there were another use of the involved address register(s) afterwards.

A simple fix for this is to COPY the address registers before the loop and use that new vreg instead. This handles the test cases and also seems clearly beneficial on SPEC:

Spill|Reload   :    613173     613123    -50
Copies         :   1018500    1016022  -2478

It doesn't seem to make a difference to do this COPY in all cases, even though it is only useful in the case of a register loop with other uses of the register.

Diff Detail

Event Timeline

jonpa created this revision.Oct 19 2021, 4:35 AM
jonpa requested review of this revision.Oct 19 2021, 4:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2021, 4:35 AM
uweigand accepted this revision.Oct 26 2021, 6:41 AM

This looks like a nice improvement. LGTM.

This revision is now accepted and ready to land.Oct 26 2021, 6:41 AM
This revision was landed with ongoing or failed builds.Oct 26 2021, 8:05 AM
This revision was automatically updated to reflect the committed changes.