This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Bugfix and refactorization of mem-mem operations
ClosedPublic

Authored by jonpa on Oct 13 2021, 8:29 AM.

Details

Summary

This patch fixes the bug that consisted of treating variable / immediate length mem operations (such as memcpy, memset, ...) differently. The variable length case needs to have the length minus 1 passed due to the use of EXRL target instructions. However, the DAGCombiner can convert a register length argument into a constant one, and whenever that happened one byte too little would be performed of the operation.

This is also a refactorization by reducing the number of opcodes and variants involved. For any opcode (variable or constant length), only the length minus one is passed on to the ISD node. The rest of the logic is now instead handled during isel pseudo expansion.

Diff Detail

Event Timeline

jonpa created this revision.Oct 13 2021, 8:29 AM
jonpa requested review of this revision.Oct 13 2021, 8:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2021, 8:30 AM
uweigand accepted this revision.Oct 13 2021, 11:41 AM

LGTM, thanks!

This revision is now accepted and ready to land.Oct 13 2021, 11:41 AM
This revision was landed with ongoing or failed builds.Oct 14 2021, 1:38 AM
This revision was automatically updated to reflect the committed changes.